Skip to content

Datepicker: When selecting a month in a year/month mode, the day selection flashes on click #20904

@csaoh

Description

@csaoh

Reproduction

https://stackblitz.com/angular/kgvngvkblme?file=src%2Fapp%2Fdatepicker-views-selection-example.ts

Steps to reproduce:

  1. Click on the calendar icon
  2. Select a year
  3. Select a month

This is actually the example from https://material.angular.io/components/datepicker/overview, although I found it more noticeable in my app

Expected Behavior

The datepicker calendar should close immediately.

Actual Behavior

When clicked on the month, the calendar briefly switches into monthly view (therefore displaying all the weeks and days), before closing.

Environment

  • Angular: 10.2.0
  • CDK/Material: 10.2.5
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions