|
| 1 | +# react-native-universal-datepicker-ios. |
| 2 | +[](http://www.codelabsys.com/) |
| 3 | +#### This component works only on IOS for Android implementation of hijri calendar please check https://www.npmjs.com/package/react-native-hijri-date-picker-android |
| 4 | +## Installation. |
| 5 | + [](https://nodei.co/npm/react-native-hijri-date-picker-android/) |
| 6 | + |
| 7 | +$ npm install react-native-hijri-date-picker-android --save |
| 8 | + |
| 9 | +$ react-native link react-native-hijri-date-picker-android |
| 10 | + |
| 11 | +## List of available calendars. |
| 12 | +* Gregorian |
| 13 | +* hijri [IslamicUmmAlQura, Islamic, islamicCivil, islamicTabular] |
| 14 | +* chinese |
| 15 | +* republicOfChina |
| 16 | +* persian |
| 17 | +* japanese |
| 18 | +* indian |
| 19 | +* coptic |
| 20 | +* ISO8601 |
| 21 | + |
| 22 | +## Available props. |
| 23 | + |
| 24 | +| Name | Type| Default | Description | |
| 25 | +| --- | --- | --- | --- | |
| 26 | +| date | string or number | today timestamp (new Date().getTime()) | timestamp value that represents the initial value of the datepicker | |
| 27 | +| maximumDate | string or number | null | timestamp value that represents the maximum date that the user can select | |
| 28 | +| minimumDate | string or number | null | timestamp value that represents the minimum date that the user can select | |
| 29 | +| onChange | func | () => null | Callback that is fired when user changes current selected date. The returned object have two properties timestamp and string date | |
| 30 | +| dateFormat | string | dd-MM-yyyy | Format for the returned selected date | |
| 31 | +| calendar | string | Gregorian | sets native calendar type | |
| 32 | +| mode | string | datetime | type of the picker supports date, time, datetime | |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +```javascript |
| 37 | + import DatepickerIOS from 'react-native-universal-datepicker-ios'; |
| 38 | + |
| 39 | + _onDateChange: function({date, timestamp}){} |
| 40 | + |
| 41 | + <DatePickerIOS calendar="IslamicUmmAlQura" |
| 42 | + date={new Date().getTime()} |
| 43 | + onChange={this._onDateChange} /> |
| 44 | +``` |
| 45 | + |
| 46 | +## Credits |
| 47 | + |
| 48 | +This project was made by the help of [Assem-Hafez](https://github.com/Assem-Hafez) |
0 commit comments