Skip to content

feat(datepicker): use invalid date instead of null when the date input it not empty #27902

@saithis

Description

@saithis

Feature Description

Set the value to invalid date instead of null, when the input is filled, but invalid. As this would be a breaking change, maybe introduce a setting to optionally enable this.

Use Case

Currently when you use a datepicker without ngModel or reactive forms the input wont get red for invalid inputs and the value is null. So you cant differenciate between empty input and something invalid. Even aria-invalid is "false".

With this feature you could solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/datepickerfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions