Skip to content

Datepicker ExpressionChangedAfterItHasBeenCheckedError on disable with focus #9559

@oliveti

Description

@oliveti

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.

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions