ng-matero/extensions

[DateTimePicker]: Current or Selected Day Highlighted in Other Months

Closed this issue · 6 comments

bah99 commented

Hello,

I'm not sure if this is a feature or an unintended behavior, but the current day or the selected day is being highlighted for all months, regardless of whether the date is relevant. This behavior is confusing and inconsistent with how Angular Material date pickers function.

Examples

  • Current Day (Not Selected):
    In the following screenshots, the current day's date is highlighted in every month, even when navigating to months where it doesn't make sense.

    Current Day Highlight 1
    Current Day Highlight 2

  • Selected Day:
    Similarly, when a specific day is selected, it appears highlighted across all months, creating further confusion:

    Selected Day Highlight 1
    Selected Day Highlight 2

Question

Is this an expected feature, or does it require a fix? If it's intentional, is there a way to disable this behavior? It seems inconsistent with the standard Angular Material date picker implementation.

Thank you in advance for your help!

bah99 commented

A new PR addressing this issue has been created: #381

nzbin commented

Thanks for your PR, the active cell logic is correct but it should be enhanced. The gray cell should only be highlighted when keyboard focused. Please check the Material does.

image

The datetimepicker's a11y is not very well now. It should add a keyboard focus monitor and improve the styles.

nzbin commented

v19 has released and try again.

bah99 commented

It's fixed now, thank you!

However, for the 'Datetimepicker Inline,' the selected date is no longer highlighted or colored. Could you please check this?

nzbin commented

It's fixed now, thank you!

However, for the 'Datetimepicker Inline,' the selected date is no longer highlighted or colored. Could you please check this?

Do you use the two-way binding?

<mtx-calendar [(selected)]="selectedDate" />
bah99 commented

It's fixed now, thank you!

However, for the 'Datetimepicker Inline,' the selected date is no longer highlighted or colored. Could you please check this?

Do you use the two-way binding?

<mtx-calendar [(selected)]="selectedDate" />

No I'm not using it, I've just tested it from the demo.