react-day-picker 8.0.0-beta.33 → 8.0.0-beta.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/{build → dist}/DayPicker.d.ts +93 -89
- package/dist/components/Button/Button.d.ts +7 -0
- package/{build → dist}/components/Button/index.d.ts +1 -1
- package/{build → dist}/components/Caption/Caption.d.ts +20 -18
- package/{build → dist}/components/Caption/index.d.ts +1 -1
- package/{build → dist}/components/CaptionLabel/CaptionLabel.d.ts +10 -8
- package/{build → dist}/components/CaptionLabel/index.d.ts +1 -1
- package/{build → dist}/components/Day/Day.d.ts +13 -13
- package/dist/components/Day/index.d.ts +1 -0
- package/{build → dist}/components/DayContent/DayContent.d.ts +15 -15
- package/{build → dist}/components/DayContent/index.d.ts +1 -1
- package/{build → dist}/components/Dropdown/Dropdown.d.ts +16 -16
- package/{build → dist}/components/Dropdown/index.d.ts +1 -1
- package/{build → dist}/components/Footer/Footer.d.ts +3 -3
- package/{build → dist}/components/Footer/index.d.ts +1 -1
- package/{build → dist}/components/Head/Head.d.ts +5 -5
- package/{build → dist}/components/Head/index.d.ts +1 -1
- package/{build → dist}/components/Head/utils/getWeekdays.d.ts +6 -6
- package/{build → dist}/components/Head/utils/index.d.ts +1 -1
- package/{build → dist}/components/IconDropdown/IconDropdown.d.ts +6 -6
- package/{build → dist}/components/IconDropdown/index.d.ts +1 -1
- package/{build → dist}/components/IconLeft/IconLeft.d.ts +6 -6
- package/{build → dist}/components/IconLeft/index.d.ts +1 -1
- package/{build → dist}/components/IconRight/IconRight.d.ts +6 -6
- package/{build → dist}/components/IconRight/index.d.ts +1 -1
- package/dist/components/Month/Month.d.ts +8 -0
- package/dist/components/Month/index.d.ts +1 -0
- package/{build → dist}/components/MonthsDropdown/MonthsDropdown.d.ts +10 -12
- package/{build → dist}/components/MonthsDropdown/index.d.ts +1 -1
- package/{build → dist}/components/Navigation/Navigation.d.ts +20 -20
- package/{build → dist}/components/Navigation/index.d.ts +1 -1
- package/dist/components/Root/Root.d.ts +3 -0
- package/{build → dist}/components/Root/index.d.ts +1 -1
- package/{build → dist}/components/Row/Row.d.ts +14 -16
- package/{build → dist}/components/Row/index.d.ts +1 -1
- package/{build → dist}/components/Table/Table.d.ts +10 -12
- package/{build → dist}/components/Table/index.d.ts +1 -1
- package/{build → dist}/components/Table/utils/getOutsideEndDays.d.ts +3 -3
- package/{build → dist}/components/Table/utils/getOutsideStartDays.d.ts +4 -4
- package/{build → dist}/components/Table/utils/getWeeks.d.ts +17 -17
- package/{build → dist}/components/WeekNumber/WeekNumber.d.ts +15 -15
- package/{build → dist}/components/WeekNumber/index.d.ts +1 -1
- package/{build → dist}/components/YearsDropdown/YearsDropdown.d.ts +16 -16
- package/{build → dist}/components/YearsDropdown/index.d.ts +1 -1
- package/dist/contexts/DayPicker/DayPickerContext.d.ts +45 -0
- package/{build → dist}/contexts/DayPicker/defaultClassNames.d.ts +5 -5
- package/dist/contexts/DayPicker/defaultContextValue.d.ts +6 -0
- package/{build → dist}/contexts/DayPicker/formatters/formatCaption.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatDay.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatMonthCaption.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatWeekNumber.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/formatters/formatWeekdayName.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatYearCaption.d.ts +6 -6
- package/{build → dist}/contexts/DayPicker/formatters/index.d.ts +6 -6
- package/dist/contexts/DayPicker/index.d.ts +2 -0
- package/{build → dist}/contexts/DayPicker/labels/index.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/labels/labelDay.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelMonthDropdown.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/labels/labelNext.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelPrevious.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelWeekNumber.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelWeekday.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelYearDropdown.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/useDayPicker.d.ts +8 -8
- package/dist/contexts/DayPicker/utils/index.d.ts +1 -0
- package/{build → dist}/contexts/DayPicker/utils/parseFromToProps.d.ts +6 -9
- package/dist/contexts/Focus/FocusContext.d.ts +36 -0
- package/dist/contexts/Focus/index.d.ts +2 -0
- package/{build/contexts/Focus/useFocus.d.ts → dist/contexts/Focus/useFocusContext.d.ts} +3 -3
- package/dist/contexts/Focus/utils/getInitialFocusTarget.d.ts +3 -0
- package/dist/contexts/Modifiers/ModifiersContext.d.ts +9 -0
- package/dist/contexts/Modifiers/index.d.ts +2 -0
- package/dist/contexts/Modifiers/useModifiers.d.ts +6 -0
- package/dist/contexts/Modifiers/utils/getActiveModifiers.d.ts +7 -0
- package/dist/contexts/Modifiers/utils/getCustomModifiers.d.ts +3 -0
- package/dist/contexts/Modifiers/utils/getInternalModifiers.d.ts +6 -0
- package/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isDateInRange.d.ts +3 -3
- package/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isMatch.d.ts +3 -5
- package/dist/contexts/Modifiers/utils/matcherToArray.d.ts +3 -0
- package/{build → dist}/contexts/Navigation/NavigationContext.d.ts +28 -24
- package/{build → dist}/contexts/Navigation/index.d.ts +2 -2
- package/{build → dist}/contexts/Navigation/useNavigation.d.ts +3 -3
- package/{build → dist}/contexts/Navigation/useNavigationState.d.ts +7 -7
- package/{build → dist}/contexts/Navigation/utils/getDisplayMonths.d.ts +8 -8
- package/{build → dist}/contexts/Navigation/utils/getInitialMonth.d.ts +3 -3
- package/{build → dist}/contexts/Navigation/utils/getNextMonth.d.ts +18 -18
- package/{build → dist}/contexts/Navigation/utils/getPreviousMonth.d.ts +19 -19
- package/{build → dist}/contexts/RootProvider.d.ts +8 -8
- package/{build → dist}/contexts/SelectMultiple/SelectMultipleContext.d.ts +35 -32
- package/{build → dist}/contexts/SelectMultiple/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectMultiple/useSelectMultiple.d.ts +3 -3
- package/{build → dist}/contexts/SelectRange/SelectRangeContext.d.ts +36 -32
- package/{build → dist}/contexts/SelectRange/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectRange/useSelectRange.d.ts +3 -3
- package/{build → dist}/contexts/SelectRange/utils/addToRange.d.ts +8 -8
- package/{build → dist}/contexts/SelectSingle/SelectSingleContext.d.ts +30 -35
- package/{build → dist}/contexts/SelectSingle/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectSingle/useSelectSingle.d.ts +3 -3
- package/dist/hooks/useActiveModifiers/index.d.ts +1 -0
- package/dist/hooks/useActiveModifiers/useActiveModifiers.d.ts +9 -0
- package/{build → dist}/hooks/useControlledValue/index.d.ts +1 -1
- package/{build → dist}/hooks/useControlledValue/useControlledValue.d.ts +12 -12
- package/dist/hooks/useDayEventHandlers/index.d.ts +1 -0
- package/dist/hooks/useDayEventHandlers/useDayEventHandlers.d.ts +28 -0
- package/dist/hooks/useDayRender/index.d.ts +1 -0
- package/dist/hooks/useDayRender/useDayRender.d.ts +39 -0
- package/dist/hooks/useDayRender/utils/getDayClassNames.d.ts +4 -0
- package/dist/hooks/useDayRender/utils/getDayStyle.d.ts +5 -0
- package/{build → dist}/hooks/useInput/index.d.ts +1 -1
- package/{build → dist}/hooks/useInput/useInput.d.ts +28 -28
- package/{build → dist}/hooks/useInput/utils/isValidDate.d.ts +2 -2
- package/dist/hooks/useSelectedDays/index.d.ts +1 -0
- package/dist/hooks/useSelectedDays/useSelectedDays.d.ts +8 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.esm.js +2213 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/{main.js → index.js} +2116 -1744
- package/dist/index.js.map +1 -0
- package/dist/react-day-picker.min.js +1 -0
- package/{style.css → dist/style.css} +21 -10
- package/{style.css.d.ts → dist/style.css.d.ts} +2 -2
- package/{build → dist}/types/DayPicker.d.ts +249 -228
- package/{build → dist}/types/DayPickerCustom.d.ts +9 -11
- package/{build → dist}/types/DayPickerMultiple.d.ts +16 -16
- package/{build → dist}/types/DayPickerRange.d.ts +17 -17
- package/{build → dist}/types/DayPickerSingle.d.ts +14 -14
- package/{build → dist}/types/EventHandlers.d.ts +51 -51
- package/{build → dist}/types/Formatters.d.ts +24 -24
- package/{build → dist}/types/Labels.d.ts +28 -28
- package/{build → dist}/types/Matchers.d.ts +34 -34
- package/dist/types/Modifiers.d.ts +51 -0
- package/{build → dist}/types/Styles.d.ts +82 -85
- package/package.json +42 -29
- package/build/DayPicker.js +0 -98
- package/build/DayPicker.js.map +0 -1
- package/build/_virtual/_tslib.js +0 -50
- package/build/_virtual/_tslib.js.map +0 -1
- package/build/components/Button/Button.d.ts +0 -7
- package/build/components/Button/Button.js +0 -23
- package/build/components/Button/Button.js.map +0 -1
- package/build/components/Caption/Caption.js +0 -57
- package/build/components/Caption/Caption.js.map +0 -1
- package/build/components/CaptionLabel/CaptionLabel.js +0 -11
- package/build/components/CaptionLabel/CaptionLabel.js.map +0 -1
- package/build/components/Day/Day.js +0 -24
- package/build/components/Day/Day.js.map +0 -1
- package/build/components/Day/hooks/index.d.ts +0 -1
- package/build/components/Day/hooks/useDay.d.ts +0 -58
- package/build/components/Day/hooks/useDay.js +0 -176
- package/build/components/Day/hooks/useDay.js.map +0 -1
- package/build/components/Day/hooks/useDayFocus.d.ts +0 -8
- package/build/components/Day/hooks/useDayFocus.js +0 -56
- package/build/components/Day/hooks/useDayFocus.js.map +0 -1
- package/build/components/Day/index.d.ts +0 -2
- package/build/components/DayContent/DayContent.js +0 -15
- package/build/components/DayContent/DayContent.js.map +0 -1
- package/build/components/Dropdown/Dropdown.js +0 -20
- package/build/components/Dropdown/Dropdown.js.map +0 -1
- package/build/components/Footer/Footer.js +0 -15
- package/build/components/Footer/Footer.js.map +0 -1
- package/build/components/Head/Head.js +0 -20
- package/build/components/Head/Head.js.map +0 -1
- package/build/components/Head/utils/getWeekdays.js +0 -18
- package/build/components/Head/utils/getWeekdays.js.map +0 -1
- package/build/components/IconDropdown/IconDropdown.js +0 -13
- package/build/components/IconDropdown/IconDropdown.js.map +0 -1
- package/build/components/IconLeft/IconLeft.js +0 -13
- package/build/components/IconLeft/IconLeft.js.map +0 -1
- package/build/components/IconRight/IconRight.js +0 -13
- package/build/components/IconRight/IconRight.js.map +0 -1
- package/build/components/MonthsDropdown/MonthsDropdown.js +0 -39
- package/build/components/MonthsDropdown/MonthsDropdown.js.map +0 -1
- package/build/components/Navigation/Navigation.js +0 -33
- package/build/components/Navigation/Navigation.js.map +0 -1
- package/build/components/Root/Root.d.ts +0 -6
- package/build/components/Root/Root.js +0 -49
- package/build/components/Root/Root.js.map +0 -1
- package/build/components/Row/Row.js +0 -22
- package/build/components/Row/Row.js.map +0 -1
- package/build/components/Table/Table.js +0 -18
- package/build/components/Table/Table.js.map +0 -1
- package/build/components/Table/utils/getOutsideEndDays.js +0 -15
- package/build/components/Table/utils/getOutsideEndDays.js.map +0 -1
- package/build/components/Table/utils/getOutsideStartDays.js +0 -15
- package/build/components/Table/utils/getOutsideStartDays.js.map +0 -1
- package/build/components/Table/utils/getWeeks.js +0 -50
- package/build/components/Table/utils/getWeeks.js.map +0 -1
- package/build/components/WeekNumber/WeekNumber.js +0 -24
- package/build/components/WeekNumber/WeekNumber.js.map +0 -1
- package/build/components/YearsDropdown/YearsDropdown.js +0 -28
- package/build/components/YearsDropdown/YearsDropdown.js.map +0 -1
- package/build/components/index.d.ts +0 -18
- package/build/contexts/DayPicker/DayPickerContext.d.ts +0 -31
- package/build/contexts/DayPicker/DayPickerContext.js +0 -14
- package/build/contexts/DayPicker/DayPickerContext.js.map +0 -1
- package/build/contexts/DayPicker/DayPickerProvider.d.ts +0 -12
- package/build/contexts/DayPicker/DayPickerProvider.js +0 -59
- package/build/contexts/DayPicker/DayPickerProvider.js.map +0 -1
- package/build/contexts/DayPicker/defaultClassNames.js +0 -42
- package/build/contexts/DayPicker/defaultClassNames.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatDay.js +0 -11
- package/build/contexts/DayPicker/formatters/formatDay.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatMonthCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatMonthCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatWeekNumber.js +0 -9
- package/build/contexts/DayPicker/formatters/formatWeekNumber.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatWeekdayName.js +0 -11
- package/build/contexts/DayPicker/formatters/formatWeekdayName.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatYearCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatYearCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/index.js +0 -7
- package/build/contexts/DayPicker/formatters/index.js.map +0 -1
- package/build/contexts/DayPicker/index.d.ts +0 -1
- package/build/contexts/DayPicker/labels/index.js +0 -8
- package/build/contexts/DayPicker/labels/index.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelDay.js +0 -11
- package/build/contexts/DayPicker/labels/labelDay.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelMonthDropdown.js +0 -9
- package/build/contexts/DayPicker/labels/labelMonthDropdown.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelNext.js +0 -9
- package/build/contexts/DayPicker/labels/labelNext.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelPrevious.js +0 -9
- package/build/contexts/DayPicker/labels/labelPrevious.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelWeekNumber.js +0 -9
- package/build/contexts/DayPicker/labels/labelWeekNumber.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelWeekday.js +0 -11
- package/build/contexts/DayPicker/labels/labelWeekday.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelYearDropdown.js +0 -9
- package/build/contexts/DayPicker/labels/labelYearDropdown.js.map +0 -1
- package/build/contexts/DayPicker/useDayPicker.js +0 -19
- package/build/contexts/DayPicker/useDayPicker.js.map +0 -1
- package/build/contexts/DayPicker/utils/index.d.ts +0 -2
- package/build/contexts/DayPicker/utils/parseFromToProps.js +0 -29
- package/build/contexts/DayPicker/utils/parseFromToProps.js.map +0 -1
- package/build/contexts/DayPicker/utils/parseModifierProps.d.ts +0 -9
- package/build/contexts/DayPicker/utils/parseModifierProps.js +0 -54
- package/build/contexts/DayPicker/utils/parseModifierProps.js.map +0 -1
- package/build/contexts/Focus/FocusContext.d.ts +0 -30
- package/build/contexts/Focus/FocusContext.js +0 -71
- package/build/contexts/Focus/FocusContext.js.map +0 -1
- package/build/contexts/Focus/index.d.ts +0 -2
- package/build/contexts/Focus/useFocus.js +0 -14
- package/build/contexts/Focus/useFocus.js.map +0 -1
- package/build/contexts/Navigation/NavigationContext.js +0 -31
- package/build/contexts/Navigation/NavigationContext.js.map +0 -1
- package/build/contexts/Navigation/useNavigation.js +0 -14
- package/build/contexts/Navigation/useNavigation.js.map +0 -1
- package/build/contexts/Navigation/useNavigationState.js +0 -19
- package/build/contexts/Navigation/useNavigationState.js.map +0 -1
- package/build/contexts/Navigation/utils/getDisplayMonths.js +0 -23
- package/build/contexts/Navigation/utils/getDisplayMonths.js.map +0 -1
- package/build/contexts/Navigation/utils/getInitialMonth.js +0 -21
- package/build/contexts/Navigation/utils/getInitialMonth.js.map +0 -1
- package/build/contexts/Navigation/utils/getNextMonth.js +0 -32
- package/build/contexts/Navigation/utils/getNextMonth.js.map +0 -1
- package/build/contexts/Navigation/utils/getPreviousMonth.js +0 -33
- package/build/contexts/Navigation/utils/getPreviousMonth.js.map +0 -1
- package/build/contexts/RootProvider.js +0 -22
- package/build/contexts/RootProvider.js.map +0 -1
- package/build/contexts/SelectMultiple/SelectMultipleContext.js +0 -82
- package/build/contexts/SelectMultiple/SelectMultipleContext.js.map +0 -1
- package/build/contexts/SelectMultiple/useSelectMultiple.js +0 -14
- package/build/contexts/SelectMultiple/useSelectMultiple.js.map +0 -1
- package/build/contexts/SelectRange/SelectRangeContext.js +0 -123
- package/build/contexts/SelectRange/SelectRangeContext.js.map +0 -1
- package/build/contexts/SelectRange/useSelectRange.js +0 -14
- package/build/contexts/SelectRange/useSelectRange.js.map +0 -1
- package/build/contexts/SelectRange/utils/addToRange.js +0 -39
- package/build/contexts/SelectRange/utils/addToRange.js.map +0 -1
- package/build/contexts/SelectSingle/SelectSingleContext.js +0 -45
- package/build/contexts/SelectSingle/SelectSingleContext.js.map +0 -1
- package/build/contexts/SelectSingle/useSelectSingle.js +0 -14
- package/build/contexts/SelectSingle/useSelectSingle.js.map +0 -1
- package/build/contexts/index.d.ts +0 -7
- package/build/hooks/index.d.ts +0 -2
- package/build/hooks/useControlledValue/useControlledValue.js +0 -19
- package/build/hooks/useControlledValue/useControlledValue.js.map +0 -1
- package/build/hooks/useInput/useInput.js +0 -101
- package/build/hooks/useInput/useInput.js.map +0 -1
- package/build/hooks/useInput/utils/isValidDate.js +0 -7
- package/build/hooks/useInput/utils/isValidDate.js.map +0 -1
- package/build/hooks/useModifiers/index.d.ts +0 -1
- package/build/hooks/useModifiers/types/UseModifiers.d.ts +0 -10
- package/build/hooks/useModifiers/types/index.d.ts +0 -1
- package/build/hooks/useModifiers/useModifiers.d.ts +0 -3
- package/build/hooks/useModifiers/useModifiers.js +0 -65
- package/build/hooks/useModifiers/useModifiers.js.map +0 -1
- package/build/hooks/useModifiers/utils/getModifierStatus.d.ts +0 -7
- package/build/hooks/useModifiers/utils/getModifierStatus.js +0 -22
- package/build/hooks/useModifiers/utils/getModifierStatus.js.map +0 -1
- package/build/hooks/useModifiers/utils/isDateInRange.js +0 -25
- package/build/hooks/useModifiers/utils/isDateInRange.js.map +0 -1
- package/build/hooks/useModifiers/utils/isMatch.js +0 -52
- package/build/hooks/useModifiers/utils/isMatch.js.map +0 -1
- package/build/main.d.ts +0 -5
- package/build/main.js +0 -40
- package/build/main.js.map +0 -1
- package/build/test/PageObjects.d.ts +0 -40
- package/build/test/customRender.d.ts +0 -4
- package/build/test/customRenderHook.d.ts +0 -3
- package/build/test/index.d.ts +0 -3
- package/build/test/setup.d.ts +0 -2
- package/build/types/DayPickerCustom.js +0 -7
- package/build/types/DayPickerCustom.js.map +0 -1
- package/build/types/DayPickerMultiple.js +0 -7
- package/build/types/DayPickerMultiple.js.map +0 -1
- package/build/types/DayPickerRange.js +0 -7
- package/build/types/DayPickerRange.js.map +0 -1
- package/build/types/DayPickerSingle.js +0 -7
- package/build/types/DayPickerSingle.js.map +0 -1
- package/build/types/Matchers.js +0 -27
- package/build/types/Matchers.js.map +0 -1
- package/build/types/Modifiers.d.ts +0 -16
- package/build/types/index.d.ts +0 -11
- package/dist/main.js.map +0 -1
|
@@ -1,228 +1,249 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Locale } from 'date-fns';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Change the
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
*
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
*
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
import { CaptionLayout, CaptionProps } from '../components/Caption';
|
|
4
|
+
import { CaptionLabelProps } from '../components/CaptionLabel';
|
|
5
|
+
import { DayProps } from '../components/Day';
|
|
6
|
+
import { DayContentProps } from '../components/DayContent';
|
|
7
|
+
import { DropdownProps } from '../components/Dropdown';
|
|
8
|
+
import { RowProps } from '../components/Row';
|
|
9
|
+
import { WeekNumberProps } from '../components/WeekNumber';
|
|
10
|
+
import { DayClickEventHandler, DayFocusEventHandler, DayKeyboardEventHandler, DayMouseEventHandler, DayTouchEventHandler, MonthChangeEventHandler, WeekNumberClickEventHandler } from './EventHandlers';
|
|
11
|
+
import { Formatters } from './Formatters';
|
|
12
|
+
import { Labels } from './Labels';
|
|
13
|
+
import { Matcher } from './Matchers';
|
|
14
|
+
import { DayModifiers, ModifiersClassNames, ModifiersStyles } from './Modifiers';
|
|
15
|
+
import { ClassNames, StyledComponent, Styles } from './Styles';
|
|
16
|
+
/**
|
|
17
|
+
* Selection modes supported by DayPicker.
|
|
18
|
+
*
|
|
19
|
+
* - `single`: use DayPicker to select single days.
|
|
20
|
+
* - `multiple`: allow selecting multiple days.
|
|
21
|
+
* - `range`: use DayPicker to select a range of days
|
|
22
|
+
* - `custom`: customize what is selected by using `onDayClick`
|
|
23
|
+
*/
|
|
24
|
+
export declare type DaySelectionMode = 'custom' | 'single' | 'multiple' | 'range';
|
|
25
|
+
/**
|
|
26
|
+
* The props for the [[DayPicker]] component.
|
|
27
|
+
*/
|
|
28
|
+
export interface DayPickerProps {
|
|
29
|
+
/** The CSS class to add to the container element. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Change the class names of the HTML elements.
|
|
33
|
+
*
|
|
34
|
+
* Use this prop when you need to change the default class names — for example
|
|
35
|
+
* when using CSS modules.
|
|
36
|
+
*/
|
|
37
|
+
classNames?: ClassNames;
|
|
38
|
+
/**
|
|
39
|
+
* Change the class name for the day matching the [[modifiers]].
|
|
40
|
+
*/
|
|
41
|
+
modifiersClassNames?: ModifiersClassNames;
|
|
42
|
+
/**
|
|
43
|
+
* Style to apply to the container element.
|
|
44
|
+
*/
|
|
45
|
+
style?: React.CSSProperties;
|
|
46
|
+
/**
|
|
47
|
+
* Change the inline styles for each UIElement.
|
|
48
|
+
*/
|
|
49
|
+
styles?: Styles;
|
|
50
|
+
/**
|
|
51
|
+
* Change the inline style for the day matching the [[modifiers]].
|
|
52
|
+
*/
|
|
53
|
+
modifiersStyles?: ModifiersStyles;
|
|
54
|
+
/**
|
|
55
|
+
* The initial month to show in the calendar. Default is the current month.
|
|
56
|
+
*
|
|
57
|
+
* Use this prop to let DayPicker control the current month. If you need to set the month programmatically, use [[month]] and [[onMonthChange]].
|
|
58
|
+
*/
|
|
59
|
+
defaultMonth?: Date;
|
|
60
|
+
/**
|
|
61
|
+
* The month to display in the calendar.
|
|
62
|
+
*
|
|
63
|
+
* As opposed to [[defaultMonth]], use this prop with [[onMonthChange]] to
|
|
64
|
+
* change the month programmatically.
|
|
65
|
+
*/
|
|
66
|
+
month?: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Event fired when the user navigates between months.
|
|
69
|
+
*/
|
|
70
|
+
onMonthChange?: MonthChangeEventHandler;
|
|
71
|
+
/**
|
|
72
|
+
* The number of displayed months. Defaults to `1`.
|
|
73
|
+
*/
|
|
74
|
+
numberOfMonths?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The earliest day to start the month navigation.
|
|
77
|
+
*/
|
|
78
|
+
fromDate?: Date;
|
|
79
|
+
/**
|
|
80
|
+
* The latest day to end the month navigation.
|
|
81
|
+
*/
|
|
82
|
+
toDate?: Date;
|
|
83
|
+
/**
|
|
84
|
+
* The earliest month to start the month navigation.
|
|
85
|
+
*/
|
|
86
|
+
fromMonth?: Date;
|
|
87
|
+
/**
|
|
88
|
+
* The latest month to end the month navigation.
|
|
89
|
+
*/
|
|
90
|
+
toMonth?: Date;
|
|
91
|
+
/**
|
|
92
|
+
* The earliest year to start the month navigation.
|
|
93
|
+
*/
|
|
94
|
+
fromYear?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The latest year to end the month navigation.
|
|
97
|
+
*/
|
|
98
|
+
toYear?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Disable the navigation between months.
|
|
101
|
+
*/
|
|
102
|
+
disableNavigation?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Paginate the month navigation displaying the [[numberOfMonths]] at time.
|
|
105
|
+
*/
|
|
106
|
+
pagedNavigation?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Render the months in reversed order (when [[numberOfMonths]] is greater
|
|
109
|
+
* than `1`) to display the most recent month first.
|
|
110
|
+
*/
|
|
111
|
+
reverseMonths?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Change the layout of the caption:
|
|
114
|
+
*
|
|
115
|
+
* - `buttons` (default): display prev/right buttons
|
|
116
|
+
* - `dropdown`: display drop-downs to change the month and the year
|
|
117
|
+
*
|
|
118
|
+
* **Note:** the `dropdown` layout is available only when `fromDate`,
|
|
119
|
+
* `fromMonth` or`fromYear` and `toDate`, `toMonth` or `toYear` are set.
|
|
120
|
+
*/
|
|
121
|
+
captionLayout?: CaptionLayout;
|
|
122
|
+
/**
|
|
123
|
+
* Display six weeks per months, regardless the month’s number of weeks.
|
|
124
|
+
* To use this prop, [[showOutsideDays]] must be set. Default to `false`.
|
|
125
|
+
*/
|
|
126
|
+
fixedWeeks?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Hide the month’s head displaying the weekday names.
|
|
129
|
+
*/
|
|
130
|
+
hideHead?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Show the outside days. An outside day is a day falling in the next or the
|
|
133
|
+
* previous month. Default is `false`.
|
|
134
|
+
*/
|
|
135
|
+
showOutsideDays?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Show the week numbers column. Default to `false`.
|
|
138
|
+
*/
|
|
139
|
+
showWeekNumber?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* A map of components used to create the layout.
|
|
142
|
+
*/
|
|
143
|
+
components?: CustomComponents;
|
|
144
|
+
/** Content to add to the `tfoot` element. */
|
|
145
|
+
footer?: React.ReactNode;
|
|
146
|
+
/**
|
|
147
|
+
* When a selection mode is set, DayPicker will focus the first selected day
|
|
148
|
+
* (if set) or the today's date (if not disabled).
|
|
149
|
+
*
|
|
150
|
+
* Use this prop when you need to focus DayPicker after a user actions, for
|
|
151
|
+
* improved accessibility.
|
|
152
|
+
*/
|
|
153
|
+
initialFocus?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Apply the `disabled` modifier to the matching days.
|
|
156
|
+
*/
|
|
157
|
+
disabled?: Matcher | Matcher[];
|
|
158
|
+
/**
|
|
159
|
+
* Apply the `hidden` modifier to the matching days. Will hide them from the
|
|
160
|
+
* calendar.
|
|
161
|
+
*/
|
|
162
|
+
hidden?: Matcher | Matcher[];
|
|
163
|
+
/** Apply the `selected` modifier to the matching days. */
|
|
164
|
+
selected?: Matcher | Matcher[];
|
|
165
|
+
/**
|
|
166
|
+
* The today’s date. Default is the current date. This Date will get the
|
|
167
|
+
* `today` modifier to style the day.
|
|
168
|
+
*/
|
|
169
|
+
today?: Date;
|
|
170
|
+
/**
|
|
171
|
+
* Add modifiers to the matching days.
|
|
172
|
+
*/
|
|
173
|
+
modifiers?: DayModifiers;
|
|
174
|
+
/**
|
|
175
|
+
* The prefix to add to the modifiers class names. Default is `rdp-day_`.
|
|
176
|
+
*
|
|
177
|
+
* Each day will get a `${modifierPrefix}${modifier}` class name when matching
|
|
178
|
+
* a modifier.
|
|
179
|
+
*/
|
|
180
|
+
modifierPrefix?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Toggle the selection mode.
|
|
183
|
+
*
|
|
184
|
+
* - `single`: use DayPicker to select single days.
|
|
185
|
+
* - `multiple`: allow selecting multiple days.
|
|
186
|
+
* - `range`: use DayPicker to select a range of days
|
|
187
|
+
* - `custom`: customize what is selected by using `onDayClick`
|
|
188
|
+
*/
|
|
189
|
+
mode?: DaySelectionMode;
|
|
190
|
+
/** The date-fns locale object used to localize dates. Defaults to* `en-US`. */
|
|
191
|
+
locale?: Locale;
|
|
192
|
+
/**
|
|
193
|
+
* Labels creators to override the defaults. Use this prop to customize the
|
|
194
|
+
* ARIA labels attributes.
|
|
195
|
+
*/
|
|
196
|
+
labels?: Partial<Labels>;
|
|
197
|
+
/**
|
|
198
|
+
* The text direction of the calendar. Use `ltr` for left-to-right (default)
|
|
199
|
+
* or `rtl` for right-to-left.
|
|
200
|
+
*/
|
|
201
|
+
dir?: string;
|
|
202
|
+
/**
|
|
203
|
+
* A map of formatters. Use the formatters to override the default formatting
|
|
204
|
+
* functions.
|
|
205
|
+
*/
|
|
206
|
+
formatters?: Partial<Formatters>;
|
|
207
|
+
onDayClick?: DayClickEventHandler;
|
|
208
|
+
onDayFocus?: DayFocusEventHandler;
|
|
209
|
+
onDayBlur?: DayFocusEventHandler;
|
|
210
|
+
onDayMouseEnter?: DayMouseEventHandler;
|
|
211
|
+
onDayMouseLeave?: DayMouseEventHandler;
|
|
212
|
+
onDayKeyDown?: DayKeyboardEventHandler;
|
|
213
|
+
onDayKeyUp?: DayKeyboardEventHandler;
|
|
214
|
+
onDayKeyPress?: DayKeyboardEventHandler;
|
|
215
|
+
onDayTouchCancel?: DayTouchEventHandler;
|
|
216
|
+
onDayTouchEnd?: DayTouchEventHandler;
|
|
217
|
+
onDayTouchMove?: DayTouchEventHandler;
|
|
218
|
+
onDayTouchStart?: DayTouchEventHandler;
|
|
219
|
+
onNextClick?: MonthChangeEventHandler;
|
|
220
|
+
onPrevClick?: MonthChangeEventHandler;
|
|
221
|
+
onWeekNumberClick?: WeekNumberClickEventHandler;
|
|
222
|
+
}
|
|
223
|
+
/** A map of the component that can be changed via the `components` prop. */
|
|
224
|
+
export interface CustomComponents {
|
|
225
|
+
/** The component for the caption element. */
|
|
226
|
+
Caption?: (props: CaptionProps) => JSX.Element | null;
|
|
227
|
+
/** The component for the caption element. */
|
|
228
|
+
CaptionLabel?: (props: CaptionLabelProps) => JSX.Element | null;
|
|
229
|
+
/** The component for the day element. This is a button or a span. */
|
|
230
|
+
Day?: (props: DayProps) => JSX.Element | null;
|
|
231
|
+
/** The component for the content of the day element. */
|
|
232
|
+
DayContent?: (props: DayContentProps) => JSX.Element | null;
|
|
233
|
+
/** The component for the drop-down elements. */
|
|
234
|
+
Dropdown?: (props: DropdownProps) => JSX.Element | null;
|
|
235
|
+
/** The component for the table footer. */
|
|
236
|
+
Footer?: () => JSX.Element | null;
|
|
237
|
+
/** The component for the table’s head. */
|
|
238
|
+
Head?: () => JSX.Element | null;
|
|
239
|
+
/** The component for the small icon in the drop-downs. */
|
|
240
|
+
IconDropdown?: (props: StyledComponent) => JSX.Element | null;
|
|
241
|
+
/** The arrow right icon (used for the Navigation buttons). */
|
|
242
|
+
IconRight?: (props: StyledComponent) => JSX.Element | null;
|
|
243
|
+
/** The arrow left icon (used for the Navigation buttons). */
|
|
244
|
+
IconLeft?: (props: StyledComponent) => JSX.Element | null;
|
|
245
|
+
/** The component for the table rows. */
|
|
246
|
+
Row?: (props: RowProps) => JSX.Element | null;
|
|
247
|
+
/** The component for the week number in the table rows. */
|
|
248
|
+
WeekNumber?: (props: WeekNumberProps) => JSX.Element | null;
|
|
249
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { DayPickerProps } from './DayPicker';
|
|
2
|
-
/** The props for the [[DayPicker]] component when using `mode="custom"`. */
|
|
3
|
-
export interface DayPickerCustomProps extends DayPickerProps {
|
|
4
|
-
mode: 'custom';
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Returns true when the props are of type [[DayPickerCustom]]. */
|
|
11
|
-
export declare function isDayPickerCustom(props: DayPickerProps): props is DayPickerCustomProps;
|
|
1
|
+
import { DayPickerProps } from './DayPicker';
|
|
2
|
+
/** The props for the [[DayPicker]] component when using `mode="custom"`. */
|
|
3
|
+
export interface DayPickerCustomProps extends DayPickerProps {
|
|
4
|
+
mode: 'custom';
|
|
5
|
+
/** Use `onDayClick` and related events instead. */
|
|
6
|
+
onSelect: never;
|
|
7
|
+
}
|
|
8
|
+
/** Returns true when the props are of type [[DayPickerCustom]]. */
|
|
9
|
+
export declare function isDayPickerCustom(props: DayPickerProps): props is DayPickerCustomProps;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { DayPickerProps } from './DayPicker';
|
|
2
|
-
import { SelectMultipleEventHandler } from './EventHandlers';
|
|
3
|
-
/** The props for the [[DayPicker]] component when using `mode="multiple"`. */
|
|
4
|
-
export interface DayPickerMultipleProps extends DayPickerProps {
|
|
5
|
-
mode: 'multiple';
|
|
6
|
-
/** The selected days. */
|
|
7
|
-
selected?: Date[];
|
|
8
|
-
/** Event fired when a days added or removed to the selection. */
|
|
9
|
-
onSelect?: SelectMultipleEventHandler;
|
|
10
|
-
/** The minimum amount of days that can be selected. */
|
|
11
|
-
min?: number;
|
|
12
|
-
/** The maximum amount of days that can be selected. */
|
|
13
|
-
max?: number;
|
|
14
|
-
}
|
|
15
|
-
/** Returns true when the props are of type [[DayPickerMultiple]]. */
|
|
16
|
-
export declare function isDayPickerMultiple(props: DayPickerProps): props is DayPickerMultipleProps;
|
|
1
|
+
import { DayPickerProps } from './DayPicker';
|
|
2
|
+
import { SelectMultipleEventHandler } from './EventHandlers';
|
|
3
|
+
/** The props for the [[DayPicker]] component when using `mode="multiple"`. */
|
|
4
|
+
export interface DayPickerMultipleProps extends DayPickerProps {
|
|
5
|
+
mode: 'multiple';
|
|
6
|
+
/** The selected days. */
|
|
7
|
+
selected?: Date[];
|
|
8
|
+
/** Event fired when a days added or removed to the selection. */
|
|
9
|
+
onSelect?: SelectMultipleEventHandler;
|
|
10
|
+
/** The minimum amount of days that can be selected. */
|
|
11
|
+
min?: number;
|
|
12
|
+
/** The maximum amount of days that can be selected. */
|
|
13
|
+
max?: number;
|
|
14
|
+
}
|
|
15
|
+
/** Returns true when the props are of type [[DayPickerMultiple]]. */
|
|
16
|
+
export declare function isDayPickerMultiple(props: DayPickerProps): props is DayPickerMultipleProps;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { DayPickerProps } from './DayPicker';
|
|
2
|
-
import { SelectRangeEventHandler } from './EventHandlers';
|
|
3
|
-
import { DateRange } from './Matchers';
|
|
4
|
-
/** The props for the [[DayPicker]] component when using `mode="range"`. */
|
|
5
|
-
export interface DayPickerRangeProps extends DayPickerProps {
|
|
6
|
-
mode: 'range';
|
|
7
|
-
/** The selected range of days. */
|
|
8
|
-
selected?: DateRange;
|
|
9
|
-
/** Event fired when a range (or a part of the range) is selected. */
|
|
10
|
-
onSelect?: SelectRangeEventHandler;
|
|
11
|
-
/** The minimum amount of days that can be selected. */
|
|
12
|
-
min?: number;
|
|
13
|
-
/** The maximum amount of days that can be selected. */
|
|
14
|
-
max?: number;
|
|
15
|
-
}
|
|
16
|
-
/** Returns true when the props are of type [[DayPickerRange]]. */
|
|
17
|
-
export declare function isDayPickerRange(props: DayPickerProps): props is DayPickerRangeProps;
|
|
1
|
+
import { DayPickerProps } from './DayPicker';
|
|
2
|
+
import { SelectRangeEventHandler } from './EventHandlers';
|
|
3
|
+
import { DateRange } from './Matchers';
|
|
4
|
+
/** The props for the [[DayPicker]] component when using `mode="range"`. */
|
|
5
|
+
export interface DayPickerRangeProps extends DayPickerProps {
|
|
6
|
+
mode: 'range';
|
|
7
|
+
/** The selected range of days. */
|
|
8
|
+
selected?: DateRange;
|
|
9
|
+
/** Event fired when a range (or a part of the range) is selected. */
|
|
10
|
+
onSelect?: SelectRangeEventHandler;
|
|
11
|
+
/** The minimum amount of days that can be selected. */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** The maximum amount of days that can be selected. */
|
|
14
|
+
max?: number;
|
|
15
|
+
}
|
|
16
|
+
/** Returns true when the props are of type [[DayPickerRange]]. */
|
|
17
|
+
export declare function isDayPickerRange(props: DayPickerProps): props is DayPickerRangeProps;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DayPickerProps } from './DayPicker';
|
|
2
|
-
import { SelectSingleEventHandler } from './EventHandlers';
|
|
3
|
-
/** The props for the [[DayPicker]] component when using `mode="single"`. */
|
|
4
|
-
export interface DayPickerSingleProps extends DayPickerProps {
|
|
5
|
-
mode: 'single';
|
|
6
|
-
/** The selected day. */
|
|
7
|
-
selected?: Date | undefined;
|
|
8
|
-
/** Event fired when a day is selected. */
|
|
9
|
-
onSelect?: SelectSingleEventHandler;
|
|
10
|
-
/** Make the selection required. */
|
|
11
|
-
required?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Returns true when the props are of type [[DayPickerSingle]]. */
|
|
14
|
-
export declare function isDayPickerSingle(props: DayPickerProps): props is DayPickerSingleProps;
|
|
1
|
+
import { DayPickerProps } from './DayPicker';
|
|
2
|
+
import { SelectSingleEventHandler } from './EventHandlers';
|
|
3
|
+
/** The props for the [[DayPicker]] component when using `mode="single"`. */
|
|
4
|
+
export interface DayPickerSingleProps extends DayPickerProps {
|
|
5
|
+
mode: 'single';
|
|
6
|
+
/** The selected day. */
|
|
7
|
+
selected?: Date | undefined;
|
|
8
|
+
/** Event fired when a day is selected. */
|
|
9
|
+
onSelect?: SelectSingleEventHandler;
|
|
10
|
+
/** Make the selection required. */
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Returns true when the props are of type [[DayPickerSingle]]. */
|
|
14
|
+
export declare function isDayPickerSingle(props: DayPickerProps): props is DayPickerSingleProps;
|