Skip to content

Commit 1cf0d6d

Browse files
authored
Update README.md
1 parent 0effe78 commit 1cf0d6d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ The `is24Hour` prop is only available on Android but you can use a small hack fo
201201
/>
202202
```
203203

204-
### How can I set an automatic locale in iOS
204+
### How can I change the picker language/locale?
205+
206+
Under the hood this library is using [`@react-native-community/datetimepicker`](https://github.com/react-native-community/react-native-datetimepicker). You can't change the language/locale from `react-native-modal-datetime-picker`. Locale/language is set at the native level, on the device itself.
205207

206-
The datepicker can adjust by itself the locale (`fr_FR`, `en_GB`...) depending on the user's device locale.
208+
### How can I set an automatic locale in iOS
209+
210+
On iOS, you can set an automatic detection of the locale (`fr_FR`, `en_GB`, ...) depending on the user's device locale.
207211
To do so, edit your `AppDelegate.m` file and add the following to `didFinishLaunchingWithOptions`.
208212

209213
```objc
@@ -229,7 +233,7 @@ const handleHide = () => {
229233

230234
See issue [#512](https://github.com/mmazzarolo/react-native-modal-datetime-picker/issues/512) for more info.
231235

232-
### The date in `onConfirm` doesn't match the picked date (on iOS)
236+
### Why does the date of `onConfirm` not match the picked date (on iOS)
233237

234238
On iOS, clicking the "Confirm" button while the spinner is still in motion — even just _slightly_ in motion — will cause the `onConfirm` callback to return the initial date instead of the picked one. This is is a long standing iOS issue (that can happen even on native app like the iOS calendar) and there's no failproof way to fix it on the JavaScript side.
235239
See [this GitHub gist](https://gist.github.com/SudoPlz/6959001879fbfcc7e2aa42a428a5265c) for an example of how it might be solved at the native level — but keep in mind it won't work on this component until it has been merged into the official React-Native repo.

0 commit comments

Comments
 (0)