diff --git a/README.md b/README.md index 13de8fdc..b4578bd9 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,15 @@ -# React Native Date Picker [![npm](https://img.shields.io/npm/v/react-native-date-picker.svg)](https://www.npmjs.com/package/react-native-date-picker) [![npm](https://img.shields.io/npm/dm/react-native-date-picker.svg)](https://www.npmjs.com/package/react-native-date-picker) +# React Native Date Picker -This is a React Native Date Picker with following main features: - -πŸ“±  Supports iOS, Android and Expo
-πŸ•‘  3 different modes: Time, Date, DateTime
-🌍  Various languages
-🎨  Customizable
-πŸ–Ό  Modal or Inlined
- -## Sponsors - -Thanks to the sponsors 🩷 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
ExpoNordic Brain Techmoraexhesengerhamxahussainlepadatumihail
- -[Become a sponsor](https://github.com/sponsors/henninghall) +A cross platform react native date picker component for android and ios. It includes 3 different modes: date, time, and datetime. The date picker is customizable and has multiple language support. ## Modal -The first option is to use the built-in modal. See code. +The first option is to use the built-in modal. - - + @@ -68,262 +19,83 @@ The first option is to use the built-in modal. See co ## Inlined -The second option is to use the inlined picker. Place it in a View or a custom made modal. See code. +The second option is to use the inlined picker. For instance in a view or a custom made modal.
React Native DateTime Picker Modal iOSReact Native DateTime Picker Modal Android + React Native DateTime Picker Modal iOSReact Native DateTime Picker Modal Android
- - + -
React Native DateTime PickerReact Native Date Time Picker + React Native DateTime PickerReact Native Date Time Picker
iOSAndroid
- -## Requirements - -- Xcode >= 11.6 -- React Native >= 0.57. -- If using React Native 0.64, 0.64.2 or later must be used. -- If using Expo, SDK 42 or later must be used. If using Expo SDK 44, 44.0.4 or later must be used. - -## Expo - -- βœ… You can use this library with [Development Builds](https://docs.expo.dev/development/introduction/). No config plugin is required. -- ❌ This library can't be used in the "Expo Go" app because it [requires custom native code](https://docs.expo.dev/workflow/customizing/). + ## Installation -1. Download package - -```sh -# npm -npm install react-native-date-picker - -# yarn -yarn add react-native-date-picker - -# pnpm -pnpm add react-native-date-picker -``` - -2. Install pods (skip for expo projects) - -``` -cd ios && pod install -``` - -3. Rebuild the project - -```sh -# expo projects -npx expo run:android -npx expo run:ios - -# non-expo projects -npx react-native run-android -npx react-native run-ios -``` - -If you're having troubles after following these steps, there might be a linking issue. - -## Example 1: Modal - -```jsx -import React, { useState } from 'react' -import { Button } from 'react-native' -import DatePicker from 'react-native-date-picker' - -export default () => { - const [date, setDate] = useState(new Date()) - const [open, setOpen] = useState(false) - - return ( - <> -