You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(mat-date-picker): month shown twice in date picker #33763
Hi @crisbeto, Based on your feedback from my recent PR, I traced how label and labelMinRequiredCells flow from MatCalendarBody through the month/year views. Based on that investigation, I’m planning to remove the label and labelMinRequiredCells bindings from MatCalendarBody entirely rather than introducing a showLabel flag. Specifically, I plan to:
Remove the label and labelMinRequiredCells inputs, the label that adds an extra row to the calendar body, _monthLabel/_yearLabel, and their template bindings.
Clean up the M2/M3 tokens that are only used for the label styling.
Regenerate the API golden and add tests covering zero and nonzero offsets.
I plan to leave the row-0 spacer in place. For offsets >= 3, it will simply be empty instead of containing the label. Based on the existing comments, removing that cell (or adding aria-hidden) appears to affect NVDA's weekday announcements.
I also checked mat-multi-year-view, and it doesn't pass either label or labelMinRequiredCells to MatCalendarBody, so the scope appears to be limited to the month/year views.
There are two things I'm still unsure about:
MatMonthView and MatYearView are annotated as @docs-private, and I couldn't find a standalone/headerless use of them in the repo. Is there a use case I'm missing where they're rendered without the MatCalendar header? If so, removing the label would also remove the only month/year indicator in that scenario.
MatCalendarBody is also @docs-private, but it is still re-exported from public-api.ts. Would removing these inputs require the usual breaking-change handling, or does @docs-private mean this can be removed without that treatment?
I'd appreciate your input and feedback. Thank you!
Activity
PreethiPantangi commentedon Sep 21, 2026
@crisbeto @tjshiu I worked on this issue and opened PR #33844 with the fix. Thanks!
PreethiPantangi commentedon Sep 22, 2026
Hi @crisbeto, Based on your feedback from my recent PR, I traced how label and labelMinRequiredCells flow from MatCalendarBody through the month/year views. Based on that investigation, I’m planning to remove the label and labelMinRequiredCells bindings from MatCalendarBody entirely rather than introducing a showLabel flag. Specifically, I plan to:
Remove the label and labelMinRequiredCells inputs, the label that adds an extra row to the calendar body, _monthLabel/_yearLabel, and their template bindings.
Clean up the M2/M3 tokens that are only used for the label styling.
Regenerate the API golden and add tests covering zero and nonzero offsets.
I plan to leave the row-0 spacer in place. For offsets >= 3, it will simply be empty instead of containing the label. Based on the existing comments, removing that cell (or adding aria-hidden) appears to affect NVDA's weekday announcements.
I also checked mat-multi-year-view, and it doesn't pass either label or labelMinRequiredCells to MatCalendarBody, so the scope appears to be limited to the month/year views.
There are two things I'm still unsure about:
MatMonthView and MatYearView are annotated as @docs-private, and I couldn't find a standalone/headerless use of them in the repo. Is there a use case I'm missing where they're rendered without the MatCalendar header? If so, removing the label would also remove the only month/year indicator in that scenario.
MatCalendarBody is also @docs-private, but it is still re-exported from public-api.ts. Would removing these inputs require the usual breaking-change handling, or does @docs-private mean this can be removed without that treatment?
I'd appreciate your input and feedback. Thank you!