diff --git a/README.md b/README.md index 7943ae5..f3e6d83 100644 --- a/README.md +++ b/README.md @@ -2,37 +2,52 @@ This is a React Native Date Picker with following main features: -📱 Supporting iOS and Android
-🕑 3 different modes: Time, Date, DateTime
-🌍 Multiple languages
-🎨 Customizable
+📱  Supporting iOS and Android
+🕑  3 different modes: Time, Date, DateTime
+🌍  Various languages
+🎨  Customizable
+🖼  Modal or stand-alone (inline)
+ +## Update 4.0.0 + +- ✅  No breaking changes + +- New feature: Modal mode + +## Modal + +The first option is to use the built-in modal. See code. - - - - + - - - + + +
iOS
React Native Date Picker + React Native DateTime Picker Modal iOSReact Native DateTime Picker Modal Android
Android
Choose from 2 different variants
iOSAndroid
+ +## Stand-alone + +The second option is to use the picker stand-alone. Inlined in a view or a custom made modal. See code. + + - + - - +
React Native Date Picker Android + React Native DateTime PickerReact Native Date Time Picker React Native Datepicker -
androidVariant="iosClone"androidVariant="nativeAndroid"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. @@ -92,7 +107,38 @@ eas build -p all --profile development If you're having troubles, read the pinned comment here. -## Minimal Example +## 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 ( + <> +