Installation
Follow these steps to install and configure React Native Date Picker in your project.Step 1: Install the Package
Choose your preferred package manager:Step 2: Install iOS Dependencies
If you’re using Expo, skip this step. Expo handles native dependencies automatically.
Step 3: Rebuild Your Project
After installing the package and dependencies, you must rebuild your project to link the native code.For Expo Projects
Build and run for each platform:What are Expo Development Builds?
What are Expo Development Builds?
Development Builds are custom versions of Expo Go that include your custom native code. Learn more in the Expo documentation.
For Non-Expo Projects
Build and run for each platform:Verification
To verify the installation was successful, import the component in your app:Troubleshooting
Linking Issues
Linking Issues
This package supports automatic linking. If you’re experiencing linking issues:For React Native >= 0.60:The package should link automatically. Try cleaning and rebuilding:For React Native < 0.60:Run manual linking:If automatic linking fails, you may need to link manually. Check the GitHub issues for manual linking instructions.
Android Proguard Configuration
Android Proguard Configuration
If you’ve enabled Proguard for Android builds, you may experience crashes in production. Add these rules to your This prevents Proguard from obfuscating required classes.
proguard-rules.pro file:Expo Go Not Supported
Expo Go Not Supported
This library cannot be used in the Expo Go app because it requires custom native code.Solution: Use Expo Development Builds instead:
- Install the package:
npx expo install react-native-date-picker - Create a development build:
npx expo run:iosornpx expo run:android - No config plugin is required
iOS Build Errors
iOS Build Errors
If you encounter build errors on iOS:
- Ensure you’re using Xcode >= 11.6
- Clean the build folder in Xcode (Cmd + Shift + K)
- Delete
ios/Podsandios/Podfile.lock - Reinstall pods:
cd ios && pod install && cd .. - Rebuild:
npx react-native run-ios
Android Build Errors
Android Build Errors
If you encounter build errors on Android:
-
Clean the build:
-
Clear the cache:
-
Rebuild:
Version Requirements
Make sure your project meets these minimum version requirements.
| Dependency | Minimum Version | Notes |
|---|---|---|
| React Native | 0.57 | For RN 0.64, use 0.64.2 or later |
| React | 17.0.1 | Peer dependency |
| Xcode | 11.6 | iOS development only |
| Expo SDK | 42 | For Expo SDK 44, use 44.0.4 or later |
Next Steps
Now that you’ve installed the library, let’s create your first date picker:Quick Start Guide
Learn how to implement your first date picker