Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-community/datetimepicker

Package Overview
Dependencies
Maintainers
41
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/datetimepicker - npm Package Compare versions

Comparing version 5.0.2 to 5.1.0

2

package.json
{
"name": "@react-native-community/datetimepicker",
"version": "5.0.2",
"version": "5.1.0",
"description": "DateTimePicker component for React Native",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -28,3 +28,3 @@ ### 🚧🚧 Looking for collaborators and backers 🚧🚧

<tr>
<td><p align="center"><img src="./docs/images/ios_date.png" width="260" height="420"/></p></td>
<td><p align="center"><img src="./docs/images/ios_date_new.png" height="420"/></p></td>
<td><p align="center"><img src="./docs/images/ios_time.png" width="260" height="420"/></p></td>

@@ -71,2 +71,3 @@ </tr>

- [`themeVariant` (`optional`, `iOS only`)](#themeVariant-optional-ios-only)
- [`locale` (`optional`, `iOS only`)](#locale-optional-ios-only)
- [`is24Hour` (`optional`, `Windows and Android only`)](#is24hour-optional-windows-and-android-only)

@@ -181,3 +182,3 @@ - [`neutralButtonLabel` (`optional`, `Android only`)](#neutralbuttonlabel-optional-android-only)

## Locale note
## Localization note

@@ -188,2 +189,4 @@ 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).

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).
For Expo, follow the [localization docs](https://docs.expo.dev/distribution/app-stores/#localizing-your-ios-app).

@@ -324,2 +327,11 @@

#### `locale` (`optional`, `iOS only`)
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.
Prefer localization as documented in [Localization note](#localization-note).
```js
<RNDateTimePicker locale="es-ES" />
```
#### `is24Hour` (`optional`, `Windows and Android only`)

@@ -326,0 +338,0 @@

@@ -46,2 +46,3 @@ /**

value,
locale,
maximumDate,

@@ -119,2 +120,3 @@ minimumDate,

date={dates.value}
locale={locale !== null && locale !== '' ? locale : undefined}
maximumDate={dates.maximumDate}

@@ -121,0 +123,0 @@ minimumDate={dates.minimumDate}

@@ -71,2 +71,7 @@ import {FC, Ref, SyntheticEvent} from 'react';

/**
* The date picker locale.
*/
locale?: string;
/**
* The interval at which minutes can be selected.

@@ -73,0 +78,0 @@ */

@@ -92,2 +92,7 @@ /**

/**
* The date picker locale.
*/
locale?: ?string,
/**
* The interval at which minutes can be selected.

@@ -94,0 +99,0 @@ */

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc