I have a regex validator but it only validates in the following format dd/mm/yyyy
export function validateDate(date: string) {
const regex = new RegExp('([0-2]{1}[0-9]{1}|3[0-1]{1})[/](0[1-9]|1[0-2])[/]([0-9]{4})');
return regex.test(date);
}
I would like to validate a date in the format
jsDate: Tue May 24 2022 10:08:18 GMT-0300 (Brasilia Standard Time)
I tried to look for some validators of this format, but I was not successful
i use mydatepicker angular date picker