Skip to content

bug(MatDatePicker, MatStepper): Min/Max validation on Datepicker doesn't update on step change in Stepper #20114

Open
@patrykp57

Description

@patrykp57

Reproduction

https://stackblitz.com/edit/angular-9-material-starter-ctvwko

Steps to reproduce:

  1. Set dates on step one to be valid (for example: 20/07/2020 - 27/07/2020)
  2. Go to step two on mat-stepper then back to step one.
  3. Change dates to be the same (25/07/2020 - 25/07/2020)
  4. Go to step two on mat-stepper then back to step one.
  5. Change dates to be in range from first repro step and different than step 3. (for example 20/07/2020 - 23/07/2020).
  6. Error appear { "matDatepickerMin": { "min": "2020-07-24T22:00:00.000Z", "actual": "2020-07-22T22:00:00.000Z" } }. It's min date from repro step 3.

Expected Behavior

Error shouldn't appear as date is in valid range.

Actual Behavior

Datepicker doesn't revalidate form control when step is changed.

Environment

  • Angular: 9.1.2
  • CDK/Material: 9.2.1
  • Browser(s): All
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    GThis is is related to a Google internal issueP3An 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