Skip to content

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS

License

Notifications You must be signed in to change notification settings

nhat292/react-native-datepicker

 
 

Repository files navigation

react-native-react-native-datepicker

Getting started

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

Mostly automatic installation

$ react-native link react-native-react-native-datepicker

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-react-native-datepicker and add RNReactNativeDatepicker.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNReactNativeDatepicker.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNReactNativeDatepickerPackage; to the imports at the top of the file
  • Add new RNReactNativeDatepickerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-react-native-datepicker'
    project(':react-native-react-native-datepicker').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-react-native-datepicker/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-react-native-datepicker')
    

Windows

Read it! :D

  1. In Visual Studio add the RNReactNativeDatepicker.sln in node_modules/react-native-react-native-datepicker/windows/RNReactNativeDatepicker.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using React.Native.Datepicker.RNReactNativeDatepicker; to the usings at the top of the file
  • Add new RNReactNativeDatepickerPackage() to the List<IReactPackage> returned by the Packages method

Usage

import RNReactNativeDatepicker from 'react-native-react-native-datepicker';

// TODO: What to do with the module?
RNReactNativeDatepicker;

About

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 64.9%
  • Java 13.4%
  • Objective-C 11.3%
  • C# 8.8%
  • Ruby 1.6%