-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(datepicker): Month view is briefly visible when closing dialog in onMonthSelected event #33044
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using datepicker for selecting a month in year view and closing the popup in onMonthSelected event, the single month view is briefly visible before the popup closes. Same issue is with selecting year and closing the popup in onYearSelected event. Basically, the "following" view flashes when closing the popup in an event rather than going through the full flow up to day selection.
This behavior can also be observed in the example for the component here.
Reproduction
StackBlitz link: https://stackblitz.com/edit/eyedzmcy?file=src%2Fexample%2Fmonth-view-flicker.ts
Steps to reproduce:
- Open the StackBlitz reproduction.
- Open month picker popup.
- Select any month.
- Observe the single month view briefly flashing before popup is fully closed.
OR
- Open the StackBlitz reproduction.
- Open year picker popup.
- Select any year.
- Observe the single year view briefly flashing before popup is fully closed.
Expected Behavior
The single month view should not be briefly visible before datepicker popup is closed in onMonthSelected. The single year view should not be briefly visible before datepicker popup is closed in onYearSelected.
Actual Behavior
The single month view is briefly visible before datepicker popup is closed in onMonthSelected. The single year view is briefly visible before datepicker popup is closed in onYearSelected.
Environment
- Angular: 21.1.0
- CDK/Material: 21.1.0
- Browser(s): Chrome
- Operating System: Windows
