简体   繁体   中英

Date picker Dialog shows only one date

在此处输入图像描述

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM