Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RNDateTimePicker instead of deprecated ones #372

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cache:
directories:
- node_modules
before_install:
- npm install
# - npm install
script:
- npm test
# - npm test
after_script:
- npm run coverage
# - npm run coverage
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.7.3

Use @react-native-community/datetimepicker insead of deprecated ones.
You need to install @react-native-community/datetimepicker (read install notes)

Add info about iOS 13 Dark Mode issue

<a name="1.7.2"></a>
## [1.7.2](https://github.com/xgfe/react-native-datepicker/compare/v1.7.0...v1.7.2) (2018-04-22)

Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ React Native DatePicker component for both Android and iOS, using DatePickerAndr

```bash
npm install react-native-datepicker --save
npm install @react-native-community/datetimepicker --save
```

Or using [react-native-ui-xg](https://github.com/xgfe/react-native-ui-xg), our react-naitve ui kit.
Expand All @@ -13,6 +14,15 @@ Or using [react-native-ui-xg](https://github.com/xgfe/react-native-ui-xg), our r
npm install react-native-ui-xg --save
```

## iOS 13 Dark Mode

Currently there is an issue with dark mode and date picker on iOS 13 and app built on Xcode 11 or higher. To workaround this issue at the moment you need to add you your iOS project plist file o opt-out from dark mode. Future versons of date picker or React Native should resolve it correctly.

```xml
<key>UIUserInterfaceStyle</key>
<string>Light</string>
```

## Example
Check [index.android.js](https://github.com/xgfe/react-native-datepicker/blob/master/index.android.js) in the Example.

Expand Down Expand Up @@ -56,7 +66,7 @@ export default class MyDatePicker extends Component {
}
// ... You can check the source to find the other keys.
}}
onDateChange={(date) => {this.setState({date: date})}}
onDateChange={(date) => {this.setState({date: date})}} // Called when the user confirm the picked date or time in the UI
/>
)
}
Expand Down
Loading