From 563b07d697324137466b008903f507e1814eb2b9 Mon Sep 17 00:00:00 2001 From: "Lisa Flinn (She/Her)" Date: Tue, 7 May 2024 15:12:29 +0100 Subject: [PATCH] add check for keepInvalid --- src/app/components/calendar/calendar.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index 2c185a590b7..f2b53cf7826 100644 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -3427,6 +3427,9 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { } isValidDateForTimeConstraints(selectedDate: Date) { + if (this.keepInvalid) { + return true; // If we are keeping invalid dates, we don't need to check for time constraints + } return (!this.minDate || selectedDate >= this.minDate) && (!this.maxDate || selectedDate <= this.maxDate); }