diff --git a/README.md b/README.md index 377d3b8..7c206c3 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,10 @@ - - - - - ## Installation -`npm install react-native-date-picker-x ` -
-or
-`yarn add react-native-date-picker-x` -
-
-`react-native link ` +1. `npm install react-native-date-picker-x --save` or `yarn add react-native-date-picker-x` +2. `react-native link ` ## Minimal Example @@ -60,37 +50,20 @@ export default class App extends Component { /> } - -``` - -## Extended Example - -```js -import React, { Component } from 'react'; -import DatePicker from 'react-native-date-picker-x'; - -const today = new Date(); -const tomorrow = new Date(new Date().getTime() + 24 * 60 * 60 * 1000); - -export default class App extends Component { - - state = { date: new Date() } - - render = () => - this.setState({ date })} - locale={'en-US'} - minuteInterval={5} - minimumDate={today} - maximumDate={tomorrow} - textColor={'#ffffff'} - fadeToColor={'#000000'} - /> -} - ``` +## Properties +Prop | Description | Screenshots +------------ | ------------- | ------------- +date | The currently selected date. | +onDateChange | Date change handler | +fadeToColor | Android picker is fading towords this background color. {color, 'none',} | +maximumDate | Maximum selectable date. | +minimumDate | Minimum selectable date | +minuteInterval | The interval at which minutes can be selected. | Date picker minute interval IOSDate picker minute interval Android +mode | The date picker mode. {'datetime', 'date', 'time'} | Datetime mode iosdatetime mode androiddate mode iosdate mode androidtime mode iostime mode android +locale | The locale for the date picker. Changes language, date order and am/pm preferences. Value needs to be a Locale ID.| React Native Date picker locale language iosReact Native Date picker locale language android +textColor | Changes the text color. | text color background color iosText color background color android ## About 📅   React Native Date Picker is a cross platform component working on both iOS and Android. It uses the slightly improved DatePickerIOS on iOS and a custom picker on Android which has similar look and feel. The datetime mode might be particulary interesting if you looking for a way to avoid two different popup pickers on android. diff --git a/docs/colors-android.png b/docs/colors-android.png index f153273..57699ad 100644 Binary files a/docs/colors-android.png and b/docs/colors-android.png differ