0

As the title says, I want to change the color of DatePicker from black to white but I did not sorted this out after trying multiple times. I've seen Nativescript's documentation regarding this but I might not understand it correctly how to do it. Also tried this example for Android API21+ from https://docs.nativescript.org/ui/components/date-picker , but nothing happens:

<!-- DatePicker in calendar mode -->
<style name="AppTheme" parent="AppThemeBase">
    <item name="android:datePickerStyle">@style/CalendarDatePicker</item>
</style>
<style name="CalendarDatePicker" parent="android:Widget.Material.Light.DatePicker">
    <item name="android:datePickerMode">calendar</item>
    <item name="colorPrimary">@color/ns_blue</item>
    <item name="colorPrimaryDark">@color/ns_primaryDark</item>
    <item name="colorAccent">@color/ns_accent</item>
</style>
Angelo
  • 195
  • 1
  • 15
  • Does this answer your question? [Nativescript Datepicker change text color](https://stackoverflow.com/questions/52298457/nativescript-datepicker-change-text-color) – miken32 Nov 21 '21 at 18:18

1 Answers1

0

You need to add it them into colors.xml: App_Resources/Android/src/main/res/values-v21/colors.xml

    <color name="ns_blue">#ff7800</color>
    <color name="ns_primaryDark">#17143d</color>
    <color name="ns_accent">#8095ac</color>

according to this solution: Nativescript Datepicker change text color

renaco
  • 1
  • 1