components icon indicating copy to clipboard operation
components copied to clipboard

fix(material/datepicker): add focus indication for selected date

Open crisbeto opened this issue 3 years ago • 4 comments

Currently there's no way to tell when the selected date in the calendar has focus. These changes reuse the styling from when the selected date is today (white circle inside the main circle).

Fixes #22883.

crisbeto avatar Jun 14 '21 15:06 crisbeto

Caretaker note: this will likely cause some screenshot diffs, because focus lands on the selected date automatically when the calendar is opened. As long as the screenshot diff only shows a slight circle inside the selected date, it should be fine.

crisbeto avatar Jun 14 '21 15:06 crisbeto

I'm not sure using the same styles as selected & today makes sense. What happens then when today is selected & focused?

mmalerba avatar Jun 14 '21 23:06 mmalerba

It'll look exactly like it does at the moment, because we don't have focus indication for the selected date right now. It's not ideal, but it's still an improvement over what we have now. The alternative would be to use a different background color if a date is selected and focused, but the current selected color is already very bright so we may have to make it darker which won't look good, IMO.

crisbeto avatar Jun 15 '21 06:06 crisbeto

Would be good to take a look at this again, the expected behavior was working in v12, but has since broken in v13 and v14

cjlawson02 avatar Oct 10 '22 22:10 cjlawson02