I want to change the default color of the date/time picker dialog in Android, so that it should match my app's theme. I searched for the solution on Google, but I couldn't find a solution.
What I was doing was creating a new style:
<style name="datepicker" parent="@android:style/Widget.DeviceDefault.DatePicker">
<!---TODO-->
<item name="android:focusedMonthDateColor">@android:color/holo_red_dark</item>
</style>
Don't know what are the attributes available for date picker dialogue. It would be great if anyone could post a link on that
and after adding the style I was calling it in my main style as
<item name="android:datePickerStyle">@style/datepicker</item>
Unfortunately, this didn't work for me at all.
Try this. It's the easiest & most efficient way
(I'm using React Native; targetSdkVersion 22). I'm trying to change the look of a calendar date picker dialog. The accepted answer didn't work for me, but this did. Hope this snippet helps some of you.
To change
DatePicker
colors (calendar mode) at application level define below properties.See http://www.zoftino.com/android-datepicker-example for other
DatePicker
custom stylescall like this
follow this it will give you all type date picker style(copy from this)
http://www.android-examples.com/change-datepickerdialog-theme-in-android-using-dialogfragment/