Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Codelabsys/react-native-universal-datepicker-ios

Open more actions menu

Repository files navigation

react-native-universal-datepicker-ios.

Codelab

This component works only on IOS.

Installation.

NPM

$ npm install react-native-universal-datepicker-ios --save

$ react-native link react-native-universal-datepicker-ios

List of available calendars.

  • Gregorian
  • hijri [IslamicUmmAlQura, Islamic, islamicCivil, islamicTabular]
  • chinese
  • republicOfChina
  • persian
  • japanese
  • indian
  • coptic
  • ISO8601

Available props.

Name Type Default Description
date string or number today timestamp (new Date().getTime()) timestamp value that represents the initial value of the datepicker
maximumDate string or number null timestamp value that represents the maximum date that the user can select
minimumDate string or number null timestamp value that represents the minimum date that the user can select
onChange func () => null Callback that is fired when user changes current selected date. The returned object have two properties timestamp and string date
dateFormat string dd-MM-yyyy Format for the returned selected date
calendar string Gregorian sets native calendar type
mode string datetime type of the picker supports date, time, datetime

Usage

  import DatepickerIOS from 'react-native-universal-datepicker-ios';
  
 _onDateChange: function({date, timestamp}){}
 
 <DatePickerIOS calendar="IslamicUmmAlQura" 
                date={new Date().getTime()}  
                onChange={this._onDateChange} />

Credits

This project was made by the help of basemsaadawy

Morty Proxy This is a proxified and sanitized view of the page, visit original site.