Skip to content

bug(datepicker): Month view is briefly visible when closing dialog in onMonthSelected event #33044

@IevaLukoseviciute

Description

@IevaLukoseviciute

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.

Image

Reproduction

StackBlitz link: https://stackblitz.com/edit/eyedzmcy?file=src%2Fexample%2Fmonth-view-flicker.ts
Steps to reproduce:

  1. Open the StackBlitz reproduction.
  2. Open month picker popup.
  3. Select any month.
  4. Observe the single month view briefly flashing before popup is fully closed.

OR

  1. Open the StackBlitz reproduction.
  2. Open year picker popup.
  3. Select any year.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions