feat: support preferredDatePickerStyle in iOS 14 #246
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The PR was opened by @SConaway in #211, who raised the issue about weird appearance in ios 14. @vonovak took over most of the implementation. This PR was opened just to trigger automatic release (that was not handled before due to wrong format of commit message).
This adds support for preferredDatePickerStyle to the module. I took the android-only
display
prop and extended the support for ios too, as opposed to adding a new ios-only prop.The implementation was quite involved; for display:
spinner, compact and inline
we just assign those topreferredDatePickerStyle
but fordefault
we first need to find out what that is going to be, which is determined by the OS, and hence there is a async call across the bridge to find this out. The value could be cached I suppose, but that can be done later.I also refactored the example app so that all the possible combinations can be properly tested. That also means changing e2e tests 😅
this requires xcode 11 to build, so we'll make this a breaking change
This closes #203, closes #75
Test Plan
Build and test the example app on xcode 11 and xcode 12
What's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist
README.md
CHANGELOG.md
example/App.js
)