Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crisbeto
Copy link
Member

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.

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 angular#22883.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent Accessibility This issue is related to accessibility (a11y) merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release labels Jun 14, 2021
@crisbeto crisbeto requested a review from mmalerba June 14, 2021 15:19
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 14, 2021
@crisbeto
Copy link
Member Author

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.

@mmalerba
Copy link
Contributor

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

@crisbeto
Copy link
Member Author

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.

@andrewseguin andrewseguin removed the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 28, 2021
@andrewseguin andrewseguin removed the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Mar 28, 2022
@cjlawson02
Copy link

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

@josephperrott josephperrott requested a review from a team as a code owner December 18, 2024 17:40
@josephperrott josephperrott requested review from amysorto and removed request for a team December 18, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility This issue is related to accessibility (a11y) merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(mat-date-range-picker): Focus indicator is not present for the selected date
6 participants