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

changed: accept undefined for the modifier props #1521

Merged
merged 2 commits into from Aug 24, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/react-day-picker/src/types/DayPickerBase.ts
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
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
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