Skip to content

Commit

Permalink
fix: types for startDate and endDate props (#5259)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKazarinov committed Dec 3, 2024
1 parent 4ce96a0 commit 589b4b6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/day.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ interface DayProps
disabledKeyboardNavigation?: boolean;
day: Date;
dayClassName?: (date: Date) => string;
endDate?: Date;
highlightDates?: Map<string, string[]>;
holidays?: HolidaysMap;
inline?: boolean;
Expand All @@ -60,7 +59,8 @@ interface DayProps
selectsDisabledDaysInRange?: boolean;
selectsMultiple?: boolean;
selectedDates?: Date[];
startDate?: Date;
startDate?: Date | null;
endDate?: Date | null;
renderDayContents?: (day: number, date: Date) => React.ReactNode;
containerRef?: React.RefObject<HTMLDivElement>;
calendarStartDay?: DateNumberType;
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ export type DatePickerProps = OmitUnion<
calendarIconClassName?: string;
toggleCalendarOnIconClick?: boolean;
holidays?: Holiday[];
startDate?: Date;
startDate?: Date | null;
endDate?: Date | null;
selected?: Date | null;
value?: string;
customInputRef?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/month.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ interface MonthProps
handleOnMonthKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
ariaLabelPrefix?: string;
day: Date;
startDate?: Date | null;
endDate?: Date | null;
orderInDisplay?: number;
fixedHeight?: boolean;
peekNextMonth?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/year.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface YearProps
clearSelectingDate?: VoidFunction;
date?: Date;
disabledKeyboardNavigation?: boolean;
endDate?: Date;
onDayClick?: (
date: Date,
event:
Expand All @@ -55,7 +54,8 @@ interface YearProps
selectsEnd?: boolean;
selectsStart?: boolean;
selectsRange?: boolean;
startDate?: Date;
startDate?: Date | null;
endDate?: Date | null;
yearItemNumber?: number;
handleOnKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
yearClassName?: (date: Date) => string;
Expand Down

0 comments on commit 589b4b6

Please sign in to comment.