You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android, the picker will be controlled by the system locale. If you wish to change it, [see instructions here](https://stackoverflow.com/a/2900144/2070942).
182
183
183
184
On iOS, the locale can be controlled from xCode, as [documented here](https://developer.apple.com/documentation/xcode/adding-support-for-languages-and-regions).
184
185
186
+
There is also the iOS-only locale prop that can be used to force locale in some cases but its usage is discouraged due to [not working robustly in all picker modes](./docs/images/ios_date_new.png) (note the mixed month and day names).
187
+
185
188
For Expo, follow the [localization docs](https://docs.expo.dev/distribution/app-stores/#localizing-your-ios-app).
186
189
187
190
## Props
@@ -317,6 +320,15 @@ Allows changing of the textColor of the date picker. Has effect only when `displ
317
320
<RNDateTimePicker textColor="red"/>
318
321
```
319
322
323
+
#### `locale` (`optional`, `iOS only`)
324
+
325
+
Allows changing the locale of the component. By default, the device's locale is used. Please note using this prop is discouraged due to not working reliably in all picker modes.
326
+
Prefer localization as documented in [Localization note](#localization-note).
327
+
328
+
```js
329
+
<RNDateTimePicker locale="es-ES"/>
330
+
```
331
+
320
332
#### `is24Hour` (`optional`, `Windows and Android only`)
321
333
322
334
Allows changing of the time picker to a 24 hour format. By default, this value is decided automatcially based on the user's chosen locale and other preferences.
0 commit comments