-
-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support preferredDatePickerStyle in iOS 14 #246
Conversation
# [3.0.0](v2.6.2...v3.0.0) (2020-08-11) ### Features * support preferredDatePickerStyle in iOS 14 ([#246](#246)) ([e96f061](e96f061)) ### BREAKING CHANGES * you need XCode 11 to build this version, and you need this version to properly support iOS 14 (for that you need XCode 12) This adds support for preferredDatePickerStyle to the module. We took the android-only display prop and extended the support for iOS too, as opposed to adding a new ios-only prop.
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks @vonovak ! Much appreciated. FYI: A coworker had an issue where an |
### Features * Fix support of iOS 14 by defaulting the community datetimepicker display to "display" (you can still manually override it if needed). See react-native-datetimepicker/datetimepicker#246. ### BREAKING CHANGES * You need at least `@react-native-community/[email protected]` for this version to work correctly. * You need XCode 11 to build this version, and you need this version to properly support iOS 14 (for that you need XCode 12)
How can i please update the package to use |
Assuming you're on the latest version (3.0.8 as of now), set that prop on the component you're rendering (either in a class's |
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
)