diff --git a/README.md b/README.md index 4789b92..fb4f877 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The second option is to use the inlined picker. Place it in a View or a custom m - 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. +- If using Expo, SDK 42 or later must be used. If using Expo SDK 44, 44.0.4 or later must be used. ## Installation @@ -171,20 +171,48 @@ export default () => { | `cancelText` | Modal only: Cancel button text. | | `theme` | Modal only, iOS 13+: The theme of the modal. `"light"`, `"dark"`, `"auto"`. Defaults to `"auto"`. | -## Linking +## Additional android styling -This package supports automatic linking. Usually, the only thing you need to do is to install the package, the cocoapods dependencies (as described above). Then rebuild the project by running `react-native run-ios`, `react-native run-android` or start the build from within Xcode/Android Studio. If you're running a React Native version below 0.60 or your setup is having issues with automatic linking, you can run `npx react-native link react-native-date-picker` and rebuild. In some occations you'll have to manually link the package. Instructions in this issue. +There are som additional styling possibilities for the "androidNative" picker variant. -## FAQ +### Divider color -### How do I change the divider color? +react native date picker divider separator color -The color of the divider, separator (or whatever you choose to call it) can only be changed on android for the androidNative variant. To change it, add the following to your android AppTheme. The theme is often found in styles.xml. +To change the divider color, open `styles.xml` and place this code right above the ``. ```xml -#ff0000 + ``` +### Button colors + +date picker button colors on android + +To change the confirm and cancel button colors. Open `styles.xml` and place this code within your theme. + +```xml + #dd00ff +``` + +### Font size + +To change the font size on Android `nativeAndroid` variant. Open `styles.xml` and place this code right above the ``. The font size is not possible to change in iOS out of the box, but there are some [iOS workarounds](https://github.com/henninghall/react-native-date-picker/discussions/171). + +```xml + +``` + +## Linking + +This package supports automatic linking. Usually, the only thing you need to do is to install the package, the cocoapods dependencies (as described above). Then rebuild the project by running `react-native run-ios`, `react-native run-android` or start the build from within Xcode/Android Studio. If you're running a React Native version below 0.60 or your setup is having issues with automatic linking, you can run `npx react-native link react-native-date-picker` and rebuild. In some occations you'll have to manually link the package. Instructions in this issue. + +## FAQ + ### How do i change the date order? (To YYYY-MM-DD etc) The order is determined by the `locale` prop. Set for instance `locale='fr'`to get the french preference. @@ -207,6 +235,7 @@ If you have enabled -The "Android Native" version looks more like a standard native implementation on Android. The divider color can be changed by adding the following to you Android theme: -
<item name="colorControlNormal">#03b6fc</item> +The "Android Native" version looks more like a standard native implementation on Android. @@ -313,6 +341,6 @@ React Native Date Picker is a cross platform component for iOS and Android. It u ## Support this package! -If you like this package and want to support it, you can give it
a review or a github star ⭐ +If you like this package, consider giving it a github star ⭐ Also, PR's are welcome! diff --git a/android/src/main/res/layout/native_picker.xml b/android/src/main/res/layout/native_picker.xml index 7bbaa1f..11deaa7 100644 --- a/android/src/main/res/layout/native_picker.xml +++ b/android/src/main/res/layout/native_picker.xml @@ -17,7 +17,7 @@ - + + + \ No newline at end of file