Skip to content

Commit

Permalink
changed: accept undefined for the selected prop (#1521)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl authored Aug 24, 2022
1 parent 557cd99 commit e4ddf9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/react-day-picker/src/types/DayPickerBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/react-day-picker/src/types/DayPickerMultiple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion packages/react-day-picker/src/types/DayPickerRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit e4ddf9d

Please sign in to comment.