Skip to content

Date validator #92

@PowerKiKi

Description

@PowerKiKi

A date validator to which we give a DateAdapter and that validate that whatever we give is either a valid string representation of a date, or a Date. So basically forwarding to DateAdapter.isValid.

It should be used used pretty much for every datepicker in all our projects.

Usage is something like:

constructor(
    dateAdapter: DateAdapter,
) {
    const formControl = new FormControl(null, [date(dateAdapter)]);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions