-
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(MatDatePicker): Range end date fails to be set correctly when chaning end date value directly from component #19588
Comments
Thank you for the report, this is definitely a bug that we should resolve. One small note on your demo: you shouldn't put |
Thanks for the quick reply!
I've taken the example from the documentation: Thanks a lot! |
… changed at the same time The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes angular#19588.
… changed at the same time The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes angular#19588.
… changed at the same time The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes #19588.
… changed at the same time (#19593) The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes #19588.
… changed at the same time (#19593) The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes #19588.
… changed at the same time (angular#19593) The date range picker inputs are set up so that they only respond to events outside of themselves so that we don't trigger duplicate events. In some cases this can be a problem, because the input can end up ignoring its own call to update the CVA value, causing it to be out of sync. These changes add an extra call that ensures that the model and CVA values are always in sync. Fixes angular#19588.
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. |
Reproduction
https://stackblitz.com/edit/angular-9-material-starter-shtplo
Steps to reproduce:
startDate
andendDate
component's variables using[(ngModel)]="startDate"
and[(ngModel)]="endDate"
accordingly.startDate
andendDate
variables from component to any new values(within one method call).Steps to reproduce usign provided stackblitz emaple:
Expected Behavior
What behavior were you expecting to see?
startDate
component variable should be set to new value.endDate
component variable should be set to new value.Actual Behavior
startDate
component variable is set correctly.endDate
component variable is reverted back to previously selected value. However matEndDate range input itself shows the correct date value.Temporal workaround
The workaround is to set timeout for setting end range value:
Environment
The text was updated successfully, but these errors were encountered: