Skip to content

Commit

Permalink
Add instructions for iOS's 24h
Browse files Browse the repository at this point in the history
  • Loading branch information
RocKhalil committed Apr 20, 2018
1 parent 5e3a37b commit 0b14bfd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -131,6 +131,10 @@ handleEndDatePicked = (date) => {
This is more a React-Native specific question than a react-native-modal-datetime-picker one.
See issue [#29](https://github.com/mmazzarolo/react-native-modal-datetime-picker/issues/29) and [#106](https://github.com/mmazzarolo/react-native-modal-datetime-picker/issues/106) for some solutions.

### How to set 24 hours in iOS ?
Since `is24Hour` is only available on Android, you can do a small hack for it by setting the app's default timezone as `en_GB`.
To do so, edit your `AppDelegate.m` file, and add `[[UIDatePicker appearance] setLocale:[[NSLocale alloc]initWithLocaleIdentifier:@"en_GB"]];` to `application didFinishLaunchingWithOptions`

## Notes
Remember to always set the `isVisible` prop to `false` in both the `onConfirm` and `onCancel` props (like in the example above).

Expand Down

0 comments on commit 0b14bfd

Please sign in to comment.