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
Copy file name to clipboardExpand all lines: README.md
+13-5
Original file line number
Diff line number
Diff line change
@@ -239,11 +239,11 @@ For Expo, follow the [localization docs](https://docs.expo.dev/distribution/app-
239
239
240
240
On Android, you have a choice between using the component API (regular React component) or an imperative api (think of something like `ReactNative.alert()`).
241
241
242
-
While the component API has the benefit of writing the same code on all platforms, to start we recommend using the imperative API on Android.
242
+
While the component API has the benefit of writing the same code on all platforms, for start we recommend using the imperative API on Android.
243
243
244
244
The `params` is an object with the same properties as the component props documented in the next paragraph. (This is also because the component api internally uses the imperative one.)
Allows changing of the time zone of the date picker. By default it uses the device's time zone.
346
+
Allows changing of the time zone of the date picker. By default, it uses the device's time zone.
347
347
348
348
```js
349
349
// UTC+1
@@ -416,7 +416,7 @@ Prefer localization as documented in [Localization note](#localization-note).
416
416
417
417
#### `is24Hour` (`optional`, `Windows and Android only`)
418
418
419
-
Allows changing of the time picker to a 24hour format. By default, this value is decided automatcially based on the locale and other preferences.
419
+
Allows changing of the time picker to a 24-hour format. By default, this value is decided automatically based on the locale and other preferences.
420
420
421
421
```js
422
422
<RNDateTimePicker is24Hour={true} />
@@ -466,7 +466,7 @@ Sets style directly on picker component. By default, the picker height is determ
466
466
467
467
Please note that by default, picker's text color is controlled by the application theme (light / dark mode). In dark mode, text is white and in light mode, text is black.
468
468
469
-
This means that eg. if the device has dark mode turned on, and your screen background color is white, you will not see the picker. Please use the `Appearance` api to adjust the picker's background color so that it is visible, as we do in the [example App](/example/App.js).
469
+
This means that e.g. if the device has dark mode turned on, and your screen background color is white, you will not see the picker. Please use the `Appearance` api to adjust the picker's background color so that it is visible, as we do in the [example App](/example/App.js).
470
470
Alternatively, use the `themeVariant` prop or [opt-out from dark mode (discouraged)](https://stackoverflow.com/a/56546554/2070942).
471
471
472
472
```js
@@ -481,6 +481,14 @@ If true, the user won't be able to interact with the view.
481
481
482
482
Callback that is called when an error occurs inside the date picker native code (such as null activity).
483
483
484
+
## Testing with Jest
485
+
486
+
If you're rendering the picker component (using the react-native-testing-library or similar), you need to mock the native module:
0 commit comments