diff --git a/README.md b/README.md index 29ee4fa..74c4977 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,11 @@ This is a React Native Date Picker with following main features: ## Installation -1. `npm install react-native-date-picker --save` -2. `react-native link react-native-date-picker` (Only needed for React Native <= 0.59) -3. `(cd ios && pod install)` (If you're using CocoaPods) +1. ```npm install react-native-date-picker``` or ```yarn add react-native-date-picker``` +1. `(cd ios && pod install)` (If you're using CocoaPods) +1. Rebuild the project (e.g. `react-native run-android` or `react-native run-ios`) + +If you're having troubles after following these steps, there might be a linking issue ## Requirements @@ -67,8 +69,8 @@ export default () => { | date | The currently selected date. | | onDateChange | Date change handler | | fadeToColor | Android picker is fading towards this background color. {color, 'none'} | -| maximumDate | Maximum selectable date. | -| minimumDate | Minimum selectable date | +| maximumDate | Maximum selectable date.
Example: `new Date("2021-12-31")` | +| minimumDate | Minimum selectable date.
Example: `new Date("2021-01-01")` | | androidVariant | Choose from 2 android style variants. {'iosClone', 'nativeAndroid'} (default: 'iosClone') | | Datepicker ios clone variantDatepicker android native variant | | minuteInterval | The interval at which minutes can be selected. | Date picker minute interval IOS | Date picker minute interval Android | | mode | The date picker mode. {'datetime', 'date', 'time'} | React native date time pickerReact native datepickerReact native time picker | react native date time picker androidreact native datepicker androidreact native time picker android | @@ -76,7 +78,9 @@ export default () => { | textColor | Changes the text color. ⚠ Colors other than black (#000000) or white (#ffffff) will replace the "Today" string with a date on iOS 13 or higher. | react native datepicker text color background color ios | Text color background color android | | timeZoneOffsetInMinutes | Timezone offset in minutes (default: device's timezone) | | dividerHeight | Change the divider height (only supported for iosClone) | -| is24hourSource | Change how the 24h mode (am/pm) should be determined, by device settings or by locale. {'locale', 'device'} (android only, default: 'device') | +| is24hourSource | Change how the 24h mode (am/pm) should be determined, by device settings or by locale. {'locale', 'device'} (android only, default: 'device') | +## Linking +This package supports automatic linking. Usually, the only thing you need to do is to install cocoapods dependencies as descripted above and rebuild the project by running `react-native run-ios`, `react-native run-android` or start the build from within Xcode/Android Studio. If you'running a React Native version below 0.60 or your settup are having issues with automatic linking, you can run `npx react-native link react-native-date-picker` and rebuild. In some occations you even have to manually link the package. Instructions in this issue. ## About