Invalidated the next and prev nav buttons for the calender component when compared to a new valid date range state withing the calender context.

This commit is contained in:
Lucid Kobold
2022-03-25 23:50:07 -05:00
parent 03b5c0c651
commit 827441ca1e
3 changed files with 25 additions and 2 deletions

View File

@@ -48,6 +48,11 @@ interface MonthContext extends MonthInfo {
layout: MonthLayout;
}
interface ValidDateRange {
start: Date;
end: Date;
}
interface UpdateCalendarProps {
year: number;
month: number;
@@ -58,5 +63,6 @@ interface CalenderContextState {
selectedDate: Date;
title: string;
layout: MonthLayout;
validDateRange: ValidDateRange;
updateDate: (input: UpdateCalendarProps) => void;
}