-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(material/datepicker): unable to select date on inline-calendar when passing a new Date()
to the [minDate] Input
#24435
Labels
Comments
new Date()
to the [minDate] Input
zarend
added a commit
to zarend/components
that referenced
this issue
Feb 16, 2022
…e or maxDate is at a different time on the same day Avoid re-rendering <mat-calendar/> when it receives a new value for either the [minDate] or [maxDate] Input, and the value is at a different time on the same day. Make two code changes to `MatCalendar` to accomplish this behavior change. - Normalize `_minDate` and `_maxDate` to midnight of the given day - Add check in `ngOnChanges` to re-render only if the current minDate is not equal to the previous minDate. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 22, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 22, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 22, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 22, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 28, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 28, 2022
…different time on the same day Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
andrewseguin
pushed a commit
that referenced
this issue
Mar 31, 2022
…different time on the same day (#24434) Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes #24384 a non-breaking code change. Fixes #24435
andrewseguin
pushed a commit
that referenced
this issue
Mar 31, 2022
…different time on the same day (#24434) Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes #24384 a non-breaking code change. Fixes #24435 (cherry picked from commit 6f9743c)
forsti0506
pushed a commit
to forsti0506/components
that referenced
this issue
Apr 3, 2022
…different time on the same day (angular#24434) Avoid re-rendering <mat-calendar/> when the [minDate] or [maxDate] Input change to a different time on the same day. In `ngOnChanges`, do not call `init` if the previous and current value for minDate/maxDate are on the same day. This makes angular#24384 a non-breaking code change. Fixes angular#24435
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
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 theminDate
ormaxDate
inputs, even if it didn't cause this bug. I'll write up this bug for it anyways as something to consider.The text was updated successfully, but these errors were encountered: