Skip to content

Commit

Permalink
add check for keepInvalid
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueTea committed May 7, 2024
1 parent 665ce7b commit 563b07d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 563b07d

Please sign in to comment.