Skip to content

bug(material/datepicker): unable to select date on inline-calendar when passing a new Date() to the [minDate] Input #24435

Closed
@zarend

Description

@zarend

Is this a regression?

#24384 introduces this bug

Description

When passing a new Date() to the [minDate] Input on mat calendar, selectedDateChange is not emitted when clicking on a date with the mouse.

Reproduction

Steps to reproduce:

  1. Open the Stackblitz example
  2. Click on any date on the calendar

Expected Behavior

Should display the selected date below the calendar and log the current date

Actual Behavior

Nothing happens, the selected date does not change, and nothing is logged to the console.

Environment

Macos 12.2.1 (21D62), Chrome 98.0.4758.102

Additional notes from bug reported

I would not recommend passing a new Date() every time to the minDate or maxDate inputs, even if it didn't cause this bug. I'll write up this bug for it anyways as something to consider.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions