Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: types for startDate and endDate props (#5259) #5260

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading