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)]);
}
A date validator to which we give a
DateAdapterand that validate that whatever we give is either a valid string representation of a date, or aDate. So basically forwarding toDateAdapter.isValid.It should be used used pretty much for every datepicker in all our projects.
Usage is something like: