Hi
I am getting getting error on these 2 fields startAT,EndAt. Using Angular 17.
export class DateRangeValidatorDirective implements Validator { validate(control: AbstractControl): ValidationErrors | null { const start: Date = control.get('startAt').value; const end: Date = control.get('endAt').value; if (start && end) { const isRangeValid = end.getTime() - start.getTime() > 0; return isRangeValid ? null : { dateRange: true }; } return null; } }
Thanks