Skip to content

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

Closed

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.

Activity

  1. added
    needs triage
    on Feb 16, 2022
  2. changed the title [-]bug(COMPONENT): TITLE[/-] [+]bug(material/datepicker): unable to select date on inline-calendar when passing a `new Date()` to the [minDate] Input[/+] on Feb 16, 2022
  3. added and removed
    needs triage
    on Feb 16, 2022
  4. added a commit that references this issue on Feb 16, 2022
    4e68b92
  5. added 6 commits that reference this issue on Mar 22, 2022
    2c15415
    80b3dde
    1d29bfb
    c349eba
    9f1fed6
    37b4f09
  6. added 2 commits that reference this issue on Mar 31, 2022
    6f9743c
    4501b25
  7. added a commit that references this issue on Apr 3, 2022
    2a51a19
  8. angular-automatic-lock-bot commented on May 1, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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