Skip to content

Datepicker throws matDatepickerParse on a empty field not required #10861

@FernandoI7

Description

@FernandoI7

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
Focus on a not required field and blur without throwing any errors

#### What is the current behavior?
After focusing and blurring in a not required field without changing its value the datepicker throws the matDatepickerParse error with text ''.
After the field value changes and returns to empty(dirty), the error no longer occurs.

#### What are the steps to reproduce?
In the example provided on the Angular Material website about "Datepicker that uses Moment.js dates" it is possible to reproduce the error
https://stackblitz.com/angular/eqjpjpvgmll?file=app%2Fdatepicker-moment-example.ts

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions