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:
6
types/CalenderContext.d.ts
vendored
6
types/CalenderContext.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user