Skip to content

bug(datepicker): monthSelected doesn't actually update formControl if calendar view closed before picking a date in the month #30463

Open
@sericuper

Description

@sericuper

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 opening a 'monthView' and closing a calendar in monthSelected event, pre-setting formControl value, its actually not changed. Its visible from the example I attached

Reproduction

StackBlitz link: https://stackblitz.com/edit/c5ckw68f?file=src%2Fexample%2Fdatepicker-views-selection-example.html,src%2Fexample%2Fdatepicker-views-selection-example.ts,src%2Fexample%2Fdatepicker-views-selection-example.css
Steps to reproduce:

  1. Select a different month in the calendar
  2. Check the output values

Expected Behavior

formControl value has a selected month

Actual Behavior

formControl value doesn't change

Environment

  • Angular: 19.1.3
  • CDK/Material: 19.1.3
  • Browser(s): Chrome (all basically)
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/datepicker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions