-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker
Description
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-ivy-8sjw5j
Steps to reproduce:
If I enter an invalid date like 'aaa' in Datepicker for the first time, then the dirty flag is not set. And then the ShowOnDirtyErrorStateMatcher does not show an error.
With the OnBlur Matcher it is working. Please comment out line 26 in app.component.ts and try it again. Enter 'aaa' and trigger onBlur while you click the tab key.
Expected Behavior
The date control is marked as dirty and the error is shown.
Actual Behavior
No error is displayed because the control is not marked as dirty.
Environment
- Angular: 9.2.4
- CDK/Material: 9.2.4
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepicker