diff --git a/packages/react-day-picker/src/types/DayPickerBase.ts b/packages/react-day-picker/src/types/DayPickerBase.ts index d51dd2a134..54bba229c0 100644 --- a/packages/react-day-picker/src/types/DayPickerBase.ts +++ b/packages/react-day-picker/src/types/DayPickerBase.ts @@ -175,15 +175,15 @@ export interface DayPickerBase { /** * Apply the `disabled` modifier to the matching days. */ - disabled?: Matcher | Matcher[]; + disabled?: Matcher | Matcher[] | undefined; /** * Apply the `hidden` modifier to the matching days. Will hide them from the * calendar. */ - hidden?: Matcher | Matcher[]; + hidden?: Matcher | Matcher[] | undefined; /** Apply the `selected` modifier to the matching days. */ - selected?: Matcher | Matcher[]; + selected?: Matcher | Matcher[] | undefined; /** * The today’s date. Default is the current date. This Date will get the diff --git a/packages/react-day-picker/src/types/DayPickerMultiple.ts b/packages/react-day-picker/src/types/DayPickerMultiple.ts index 67289a2f89..dfc7ff146b 100644 --- a/packages/react-day-picker/src/types/DayPickerMultiple.ts +++ b/packages/react-day-picker/src/types/DayPickerMultiple.ts @@ -9,7 +9,7 @@ import { SelectMultipleEventHandler } from './EventHandlers'; export interface DayPickerMultipleProps extends DayPickerBase { mode: 'multiple'; /** The selected days. */ - selected?: Date[]; + selected?: Date[] | undefined; /** Event fired when a days added or removed to the selection. */ onSelect?: SelectMultipleEventHandler; /** The minimum amount of days that can be selected. */ diff --git a/packages/react-day-picker/src/types/DayPickerRange.ts b/packages/react-day-picker/src/types/DayPickerRange.ts index 7ffb64cafb..8d2a4ec047 100644 --- a/packages/react-day-picker/src/types/DayPickerRange.ts +++ b/packages/react-day-picker/src/types/DayPickerRange.ts @@ -10,7 +10,7 @@ import { DateRange } from './Matchers'; export interface DayPickerRangeProps extends DayPickerBase { mode: 'range'; /** The selected range of days. */ - selected?: DateRange; + selected?: DateRange | undefined; /** Event fired when a range (or a part of the range) is selected. */ onSelect?: SelectRangeEventHandler; /** The minimum amount of days that can be selected. */