Skip to content
Advertisement

Date picker Dialog shows only one date

enter image description here

I am trying to implement the date picker dialog but the dialog appears with just a single date and show rest of the date as blank what could be the reason?

Advertisement

Answer

This is definitely a Theme issue. The selected date is visible because of the contrast in text color and circle color. You can refer this link for understanding the anatomy of the Date Picker theme by the Material design guideline.

https://material.io/components/date-pickers#theming

Refer this answer for understanding which colors to use.

https://stackoverflow.com/a/29014475/4491971

You can use these attributes to change the colors via style

dayOfWeekBackground
dayOfWeekTextAppearance
headerMonthTextAppearance
headerDayOfMonthTextAppearance
headerYearTextAppearance
headerSelectedTextColor
yearListItemTextAppearance
yearListSelectorColor
calendarTextColor
calendarSelectedTextColor

If you share the current style and the code snippet, we can refine the answer more.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement