react-native-datepicker change background color code example
Example: change react native datetime picker background color "android"
i want to share how i can change theme color of the picker.
in android/app/src/main/res/values/styles.xml i put:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:datePickerDialogTheme">@style/DialogDatePicker.Theme</item>
</style>
<style name="DialogDatePicker.Theme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">@color/ocean_green</item>
<item name="android:textColor">@color/dove_gray</item>
<item name="android:textColorPrimary">@color/dove_gray</item>
</style>
* colorAccent is the color of header of picker and selector
* textColor is the color of numbers and text buttons
* textColorPrimary is the color of text of month.
I hope it works for you, regards.
Tip for the those using the time picker and would like to change the colors.
Change android:datePickerDialogTheme to android:timePickerDialogTheme
(======================need more help visit the blow linhk========================)
https://hashnode.com/post/step-by-step-guide-on-how-to-change-background-and-text-color-of-android-date-time-picker-in-react-native-ckacitc6j02lvb6s1u01uyzzl