Skip to content
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

fix(datepicker): date range overriding model value if both fields are changed at the same time #19593

Merged

Conversation

crisbeto
Copy link
Member

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.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release labels Jun 10, 2020
@crisbeto crisbeto requested a review from mmalerba as a code owner June 10, 2020 16:05
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 10, 2020
… 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.
@crisbeto crisbeto force-pushed the 19588/date-range-picker-model-override branch from b6e89de to d3de6bc Compare June 10, 2020 16:15
@crisbeto crisbeto added this to the 10.0.0 milestone Jun 10, 2020
@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels Jun 11, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Jun 11, 2020
@crisbeto
Copy link
Member Author

crisbeto commented Jun 11, 2020

This should be cherry picked into 10.0.x as well.

@devversion devversion added target: patch This PR is targeted for the next patch release and removed merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release labels Jun 12, 2020
@devversion
Copy link
Member

Marking as target: patch so that the merge script cherry-picks this automatically into 10.0.x. We recently added temporary logic for this, so the manual caretaker note is no longer needed.

@mmalerba mmalerba merged commit f428c00 into angular:master Jun 16, 2020
mmalerba pushed a commit that referenced this pull request Jun 16, 2020
… 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.
devversion pushed a commit to devversion/material2 that referenced this pull request Jun 17, 2020
… 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.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
4 participants