-
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
Datepicker ExpressionChangedAfterItHasBeenCheckedError on disable with focus #9559
Labels
P4
A relatively minor issue that is not relevant to core functions
Comments
jelbourn
added
the
P4
A relatively minor issue that is not relevant to core functions
label
Jan 24, 2018
Just want to collect what I figured out while debugging this issue.
|
devversion
added a commit
to devversion/material2
that referenced
this issue
Jan 31, 2018
…puts turn disabled In some situations, the `disable()` method of a form control is called while the datepicker input is focused. This causes a changed after checked error. Normally, native input elements automatically blur if they turn disabled. This behavior is problematic, because it would mean that it triggers another change detection cycle, which then causes a changed after checked error if the input element was focused before. Fixes angular#9559
mmalerba
pushed a commit
that referenced
this issue
Feb 8, 2018
…puts turn disabled (#9717) In some situations, the `disable()` method of a form control is called while the datepicker input is focused. This causes a changed after checked error. Normally, native input elements automatically blur if they turn disabled. This behavior is problematic, because it would mean that it triggers another change detection cycle, which then causes a changed after checked error if the input element was focused before. Fixes #9559
mmalerba
pushed a commit
that referenced
this issue
Feb 8, 2018
…puts turn disabled (#9717) In some situations, the `disable()` method of a form control is called while the datepicker input is focused. This causes a changed after checked error. Normally, native input elements automatically blur if they turn disabled. This behavior is problematic, because it would mean that it triggers another change detection cycle, which then causes a changed after checked error if the input element was focused before. Fixes #9559
tinayuangao
pushed a commit
that referenced
this issue
Feb 9, 2018
…puts turn disabled (#9717) In some situations, the `disable()` method of a form control is called while the datepicker input is focused. This causes a changed after checked error. Normally, native input elements automatically blur if they turn disabled. This behavior is problematic, because it would mean that it triggers another change detection cycle, which then causes a changed after checked error if the input element was focused before. Fixes #9559
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.
Bug, feature request, or proposal:
Bug
What is the expected behavior?
It should be possible to disable a focused date picker
What is the current behavior?
An error is raised when the datepicker field is disabled when the field is focused.
Error message :
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'mat-input-invalid: true'. Current value: 'mat-input-invalid: false'.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-date-picker-cd-focus
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material : 5.1.0
Is there anything else we should know?
It works is the field is programmatically blurred before being disabled.
The text was updated successfully, but these errors were encountered: