@fluentui/react-calendar-compat 0.0.0-nightly-20231023-0416.1 → 0.0.2
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.json +9 -51
- package/CHANGELOG.md +7 -14
- package/dist/index.d.ts +1376 -0
- package/lib/Calendar.js +1 -0
- package/lib/Calendar.js.map +1 -0
- package/lib/CalendarDay.js +1 -0
- package/lib/CalendarDay.js.map +1 -0
- package/lib/CalendarDayGrid.js +1 -0
- package/lib/CalendarDayGrid.js.map +1 -0
- package/lib/CalendarMonth.js +1 -0
- package/lib/CalendarMonth.js.map +1 -0
- package/lib/CalendarPicker.js +1 -0
- package/lib/CalendarPicker.js.map +1 -0
- package/lib/CalendarYear.js +1 -0
- package/lib/CalendarYear.js.map +1 -0
- package/lib/components/Calendar/Calendar.js +302 -0
- package/lib/components/Calendar/Calendar.js.map +1 -0
- package/lib/components/Calendar/Calendar.types.js +10 -0
- package/lib/components/Calendar/Calendar.types.js.map +1 -0
- package/lib/components/Calendar/defaults.js +2 -0
- package/lib/components/Calendar/defaults.js.map +1 -0
- package/lib/components/Calendar/index.js +4 -0
- package/lib/components/Calendar/index.js.map +1 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js +167 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.js +111 -0
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.types.js +1 -0
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib/components/CalendarDay/index.js +3 -0
- package/lib/components/CalendarDay/index.js.map +1 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +180 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +168 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +164 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js +26 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +36 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/index.js +4 -0
- package/lib/components/CalendarDayGrid/index.js.map +1 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +437 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +98 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeeks.js +45 -0
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.js +263 -0
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib/components/CalendarMonth/index.js +3 -0
- package/lib/components/CalendarMonth/index.js.map +1 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +8 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib/components/CalendarPicker/index.js +2 -0
- package/lib/components/CalendarPicker/index.js.map +1 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +371 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.js +298 -0
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.types.js +1 -0
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib/components/CalendarYear/index.js +3 -0
- package/lib/components/CalendarYear/index.js.map +1 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +10 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/animations.js +97 -0
- package/lib/utils/animations.js.map +1 -0
- package/lib/utils/constants.js +62 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js +95 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js +1 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib/utils/dateFormatting/index.js +2 -0
- package/lib/utils/dateFormatting/index.js.map +1 -0
- package/lib/utils/dateGrid/dateGrid.types.js +1 -0
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib/utils/dateGrid/findAvailableDate.js +22 -0
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js +18 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js +16 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib/utils/dateGrid/getDayGrid.js +71 -0
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib/utils/dateGrid/index.js +5 -0
- package/lib/utils/dateGrid/index.js.map +1 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js +9 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js +9 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib/utils/dateGrid/isContiguous.js +18 -0
- package/lib/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib/utils/dateGrid/isRestrictedDate.js +15 -0
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib/utils/dateMath/dateMath.js +339 -0
- package/lib/utils/dateMath/dateMath.js.map +1 -0
- package/lib/utils/dateMath/index.js +1 -0
- package/lib/utils/dateMath/index.js.map +1 -0
- package/lib/utils/dom.js +8 -0
- package/lib/utils/dom.js.map +1 -0
- package/lib/utils/focus.js +26 -0
- package/lib/utils/focus.js.map +1 -0
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -0
- package/lib-commonjs/Calendar.js +6 -0
- package/lib-commonjs/Calendar.js.map +1 -0
- package/lib-commonjs/CalendarDay.js +6 -0
- package/lib-commonjs/CalendarDay.js.map +1 -0
- package/lib-commonjs/CalendarDayGrid.js +6 -0
- package/lib-commonjs/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/CalendarMonth.js +6 -0
- package/lib-commonjs/CalendarMonth.js.map +1 -0
- package/lib-commonjs/CalendarPicker.js +6 -0
- package/lib-commonjs/CalendarPicker.js.map +1 -0
- package/lib-commonjs/CalendarYear.js +6 -0
- package/lib-commonjs/CalendarYear.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.js +311 -0
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js +21 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -0
- package/lib-commonjs/components/Calendar/defaults.js +12 -0
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -0
- package/lib-commonjs/components/Calendar/index.js +15 -0
- package/lib-commonjs/components/Calendar/index.js.map +1 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +339 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +120 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +6 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/index.js +8 -0
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +357 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +179 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +6 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +173 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +35 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +45 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js +22 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +890 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +105 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +54 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +272 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +6 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/index.js +8 -0
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +14 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +4 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/index.js +7 -0
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +742 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +307 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +6 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/index.js +8 -0
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +14 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +154 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/utils/animations.js +154 -0
- package/lib-commonjs/utils/animations.js.map +1 -0
- package/lib-commonjs/utils/constants.js +92 -0
- package/lib-commonjs/utils/constants.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +116 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +4 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/index.js +7 -0
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js +4 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js +29 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +23 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +20 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +76 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/index.js +10 -0
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js +28 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +21 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib-commonjs/utils/dateMath/dateMath.js +308 -0
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -0
- package/lib-commonjs/utils/dateMath/index.js +6 -0
- package/lib-commonjs/utils/dateMath/index.js.map +1 -0
- package/lib-commonjs/utils/dom.js +18 -0
- package/lib-commonjs/utils/dom.js.map +1 -0
- package/lib-commonjs/utils/focus.js +31 -0
- package/lib-commonjs/utils/focus.js.map +1 -0
- package/lib-commonjs/utils/index.js +12 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/package.json +15 -10
package/dist/index.d.ts
ADDED
@@ -0,0 +1,1376 @@
|
|
1
|
+
import * as React_2 from 'react';
|
2
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Returns a date offset from the given date by the specified number of days.
|
6
|
+
* @param date - The origin date
|
7
|
+
* @param days - The number of days to offset. 'days' can be negative.
|
8
|
+
* @returns A new Date object offset from the origin date by the given number of days
|
9
|
+
*/
|
10
|
+
export declare function addDays(date: Date, days: number): Date;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Returns a date offset from the given date by the specified number of months.
|
14
|
+
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
15
|
+
* to contain the original day-of-month, we'll use the last day of the new month.
|
16
|
+
* @param date - The origin date
|
17
|
+
* @param months - The number of months to offset. 'months' can be negative.
|
18
|
+
* @returns A new Date object offset from the origin date by the given number of months
|
19
|
+
*/
|
20
|
+
export declare function addMonths(date: Date, months: number): Date;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Returns a date offset from the given date by the specified number of weeks.
|
24
|
+
* @param date - The origin date
|
25
|
+
* @param weeks - The number of weeks to offset. 'weeks' can be negative.
|
26
|
+
* @returns A new Date object offset from the origin date by the given number of weeks
|
27
|
+
*/
|
28
|
+
export declare function addWeeks(date: Date, weeks: number): Date;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Returns a date offset from the given date by the specified number of years.
|
32
|
+
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
33
|
+
* to contain the original day-of-month, we'll use the last day of the new month.
|
34
|
+
* @param date - The origin date
|
35
|
+
* @param years - The number of years to offset. 'years' can be negative.
|
36
|
+
* @returns A new Date object offset from the origin date by the given number of years
|
37
|
+
*/
|
38
|
+
export declare function addYears(date: Date, years: number): Date;
|
39
|
+
|
40
|
+
export declare enum AnimationDirection {
|
41
|
+
/**
|
42
|
+
* Grid will transition out and in horizontally
|
43
|
+
*/
|
44
|
+
Horizontal = 0,
|
45
|
+
/**
|
46
|
+
* Grid will transition out and in vertically
|
47
|
+
*/
|
48
|
+
Vertical = 1
|
49
|
+
}
|
50
|
+
|
51
|
+
/**
|
52
|
+
* @internal
|
53
|
+
*/
|
54
|
+
export declare const Calendar: React_2.FunctionComponent<CalendarProps>;
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @internal
|
58
|
+
*/
|
59
|
+
export declare const calendarClassNames: SlotClassNames<CalendarStyles>;
|
60
|
+
|
61
|
+
/**
|
62
|
+
* @internal
|
63
|
+
*/
|
64
|
+
export declare const CalendarDay: React_2.FunctionComponent<CalendarDayProps>;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* @internal
|
68
|
+
*/
|
69
|
+
export declare const calendarDayClassNames: SlotClassNames<CalendarDayStyles>;
|
70
|
+
|
71
|
+
export declare const CalendarDayGrid: React_2.FunctionComponent<CalendarDayGridProps>;
|
72
|
+
|
73
|
+
/**
|
74
|
+
* @internal
|
75
|
+
*/
|
76
|
+
export declare const calendarDayGridClassNames: SlotClassNames<CalendarDayGridStyles>;
|
77
|
+
|
78
|
+
/**
|
79
|
+
* @internal
|
80
|
+
*/
|
81
|
+
export declare interface CalendarDayGridProps extends DayGridOptions {
|
82
|
+
/**
|
83
|
+
* Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing
|
84
|
+
* the public methods and properties of the component.
|
85
|
+
*/
|
86
|
+
componentRef?: React_2.RefObject<ICalendarDayGrid>;
|
87
|
+
/**
|
88
|
+
* Additional CSS class(es) to apply to the CalendarDayGrid.
|
89
|
+
*/
|
90
|
+
className?: string;
|
91
|
+
/**
|
92
|
+
* Localized strings to use in the CalendarDayGrid
|
93
|
+
*/
|
94
|
+
strings: CalendarStrings;
|
95
|
+
/**
|
96
|
+
* The currently selected date
|
97
|
+
*/
|
98
|
+
selectedDate: Date;
|
99
|
+
/**
|
100
|
+
* The currently navigated date
|
101
|
+
*/
|
102
|
+
navigatedDate: Date;
|
103
|
+
/**
|
104
|
+
* Callback issued when a date is selected
|
105
|
+
* @param date - The date the user selected
|
106
|
+
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
107
|
+
* for the component.
|
108
|
+
*/
|
109
|
+
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
110
|
+
/**
|
111
|
+
* Callback issued when a date in the calendar is navigated
|
112
|
+
* @param date - The date that is navigated to
|
113
|
+
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
114
|
+
*/
|
115
|
+
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
116
|
+
/**
|
117
|
+
* Callback issued when calendar day is closed
|
118
|
+
*/
|
119
|
+
onDismiss?: () => void;
|
120
|
+
/**
|
121
|
+
* The first day of the week for your locale.
|
122
|
+
* @default DayOfWeek.Sunday
|
123
|
+
*/
|
124
|
+
firstDayOfWeek: DayOfWeek;
|
125
|
+
/**
|
126
|
+
* Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
|
127
|
+
* FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
|
128
|
+
* @default FirstWeekOfYear.FirstDay
|
129
|
+
*/
|
130
|
+
firstWeekOfYear: FirstWeekOfYear;
|
131
|
+
/**
|
132
|
+
* The date range type indicating how many days should be selected as the user
|
133
|
+
* selects days
|
134
|
+
* @default DateRangeType.Day
|
135
|
+
*/
|
136
|
+
dateRangeType: DateRangeType;
|
137
|
+
/**
|
138
|
+
* The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
|
139
|
+
* views.
|
140
|
+
* @default 1
|
141
|
+
*/
|
142
|
+
daysToSelectInDayView?: number;
|
143
|
+
/**
|
144
|
+
* Value of today. If unspecified, current time in client machine will be used.
|
145
|
+
*/
|
146
|
+
today?: Date;
|
147
|
+
/**
|
148
|
+
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
149
|
+
* @default false
|
150
|
+
*/
|
151
|
+
showWeekNumbers?: boolean;
|
152
|
+
/**
|
153
|
+
* Apply additional formatting to dates, for example localized date formatting.
|
154
|
+
*/
|
155
|
+
dateTimeFormatter: DateFormatting;
|
156
|
+
/**
|
157
|
+
* Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the
|
158
|
+
* specific day.
|
159
|
+
*/
|
160
|
+
customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;
|
161
|
+
/**
|
162
|
+
* How many weeks to show by default. If not provided, will show enough weeks to display the current
|
163
|
+
* month, between 4 and 6 depending
|
164
|
+
* @default undefined
|
165
|
+
*/
|
166
|
+
weeksToShow?: number;
|
167
|
+
/**
|
168
|
+
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
169
|
+
*/
|
170
|
+
minDate?: Date;
|
171
|
+
/**
|
172
|
+
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
173
|
+
*/
|
174
|
+
maxDate?: Date;
|
175
|
+
/**
|
176
|
+
* If set the Calendar will not allow selection of dates in this array.
|
177
|
+
*/
|
178
|
+
restrictedDates?: Date[];
|
179
|
+
/**
|
180
|
+
* The days that are selectable when `dateRangeType` is WorkWeek.
|
181
|
+
* If `dateRangeType` is not WorkWeek this property does nothing.
|
182
|
+
* @default [Monday,Tuesday,Wednesday,Thursday,Friday]
|
183
|
+
*/
|
184
|
+
workWeekDays?: DayOfWeek[];
|
185
|
+
/**
|
186
|
+
* Whether the close button should be shown or not
|
187
|
+
* @default false
|
188
|
+
*/
|
189
|
+
showCloseButton?: boolean;
|
190
|
+
/**
|
191
|
+
* Allows all dates and buttons to be focused, including disabled ones
|
192
|
+
* @default false
|
193
|
+
*/
|
194
|
+
allFocusable?: boolean;
|
195
|
+
/**
|
196
|
+
* The ID of the control that labels this one
|
197
|
+
*/
|
198
|
+
labelledBy?: string;
|
199
|
+
/**
|
200
|
+
* Whether to show days outside the selected month with lighter styles
|
201
|
+
* @default true
|
202
|
+
*/
|
203
|
+
lightenDaysOutsideNavigatedMonth?: boolean;
|
204
|
+
/**
|
205
|
+
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
206
|
+
*/
|
207
|
+
animationDirection?: AnimationDirection;
|
208
|
+
/**
|
209
|
+
* Optional callback function to mark specific days with a small symbol. Fires when the date range changes,
|
210
|
+
* gives the starting and ending displayed dates and expects the list of which days in between should be
|
211
|
+
* marked.
|
212
|
+
*/
|
213
|
+
getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];
|
214
|
+
}
|
215
|
+
|
216
|
+
/**
|
217
|
+
* @internal
|
218
|
+
*/
|
219
|
+
export declare interface CalendarDayGridStyleProps {
|
220
|
+
/**
|
221
|
+
* Accept custom classNames
|
222
|
+
*/
|
223
|
+
className?: string;
|
224
|
+
/**
|
225
|
+
* The date range type
|
226
|
+
*/
|
227
|
+
dateRangeType?: DateRangeType;
|
228
|
+
/**
|
229
|
+
* Whether week numbers are being shown
|
230
|
+
*/
|
231
|
+
showWeekNumbers?: boolean;
|
232
|
+
/**
|
233
|
+
* Whether to show days outside the selected month with lighter styles
|
234
|
+
*/
|
235
|
+
lightenDaysOutsideNavigatedMonth?: boolean;
|
236
|
+
/**
|
237
|
+
* Whether grid entering animation should be forwards or backwards
|
238
|
+
*/
|
239
|
+
animateBackwards?: boolean;
|
240
|
+
/**
|
241
|
+
* The cardinal directions for animation to occur during transitions, either horizontal or vertical
|
242
|
+
*/
|
243
|
+
animationDirection?: AnimationDirection;
|
244
|
+
}
|
245
|
+
|
246
|
+
/**
|
247
|
+
* @internal
|
248
|
+
*/
|
249
|
+
export declare interface CalendarDayGridStyles {
|
250
|
+
/**
|
251
|
+
* The style for the root div
|
252
|
+
*/
|
253
|
+
wrapper?: string;
|
254
|
+
/**
|
255
|
+
* The style for the table containing the grid
|
256
|
+
*/
|
257
|
+
table?: string;
|
258
|
+
/**
|
259
|
+
* The style to apply to the grid cells for days
|
260
|
+
*/
|
261
|
+
dayCell?: string;
|
262
|
+
/**
|
263
|
+
* The style to apply to grid cells for days in the selected range
|
264
|
+
*/
|
265
|
+
daySelected?: string;
|
266
|
+
/**
|
267
|
+
* The style to apply to row around weeks
|
268
|
+
*/
|
269
|
+
weekRow?: string;
|
270
|
+
/**
|
271
|
+
* The style to apply to the column headers above the weeks
|
272
|
+
*/
|
273
|
+
weekDayLabelCell?: string;
|
274
|
+
/**
|
275
|
+
* The style to apply to grid cells for week numbers
|
276
|
+
*/
|
277
|
+
weekNumberCell?: string;
|
278
|
+
/**
|
279
|
+
* The style to apply to individual days that are outside the min/max date range
|
280
|
+
*/
|
281
|
+
dayOutsideBounds?: string;
|
282
|
+
/**
|
283
|
+
* The style to apply to individual days that are outside the current month
|
284
|
+
*/
|
285
|
+
dayOutsideNavigatedMonth?: string;
|
286
|
+
/**
|
287
|
+
* The style to apply to the button element within the day cells
|
288
|
+
*/
|
289
|
+
dayButton?: string;
|
290
|
+
/**
|
291
|
+
* The style to apply to the individual button element that matches the "today" parameter
|
292
|
+
*/
|
293
|
+
dayIsToday?: string;
|
294
|
+
/**
|
295
|
+
* The style applied to the first placeholder week used during transitions
|
296
|
+
*/
|
297
|
+
firstTransitionWeek?: string;
|
298
|
+
/**
|
299
|
+
* The style applied to the last placeholder week used during transitions
|
300
|
+
*/
|
301
|
+
lastTransitionWeek?: string;
|
302
|
+
/**
|
303
|
+
* The style applied to the marker on days to mark as important
|
304
|
+
*/
|
305
|
+
dayMarker?: string;
|
306
|
+
}
|
307
|
+
|
308
|
+
export declare interface CalendarDayProps extends CalendarDayGridProps {
|
309
|
+
/**
|
310
|
+
* Optional callback to access the ICalendarDay interface. Use this instead of ref for accessing
|
311
|
+
* the public methods and properties of the component.
|
312
|
+
*/
|
313
|
+
componentRef?: React_2.RefObject<ICalendarDay>;
|
314
|
+
/**
|
315
|
+
* Additional CSS class(es) to apply to the CalendarDay.
|
316
|
+
*/
|
317
|
+
className?: string;
|
318
|
+
/**
|
319
|
+
* Localized strings to use in the Calendar
|
320
|
+
*/
|
321
|
+
strings: CalendarStrings;
|
322
|
+
/**
|
323
|
+
* The currently navigated date
|
324
|
+
*/
|
325
|
+
navigatedDate: Date;
|
326
|
+
/**
|
327
|
+
* Callback issued when a date in the calendar is navigated
|
328
|
+
* @param date - The date that is navigated to
|
329
|
+
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
330
|
+
*/
|
331
|
+
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
332
|
+
/**
|
333
|
+
* Callback issued when calendar day is closed
|
334
|
+
*/
|
335
|
+
onDismiss?: () => void;
|
336
|
+
/**
|
337
|
+
* Callback function when the header is selected
|
338
|
+
*/
|
339
|
+
onHeaderSelect?: () => void;
|
340
|
+
/**
|
341
|
+
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
342
|
+
* @default false
|
343
|
+
*/
|
344
|
+
showWeekNumbers?: boolean;
|
345
|
+
/**
|
346
|
+
* Apply additional formatting to dates, for example localized date formatting.
|
347
|
+
*/
|
348
|
+
dateTimeFormatter: DateFormatting;
|
349
|
+
/**
|
350
|
+
* Whether the calendar should show 6 weeks by default.
|
351
|
+
* @default false
|
352
|
+
*/
|
353
|
+
showSixWeeksByDefault?: boolean;
|
354
|
+
/**
|
355
|
+
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
356
|
+
*/
|
357
|
+
minDate?: Date;
|
358
|
+
/**
|
359
|
+
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
360
|
+
*/
|
361
|
+
maxDate?: Date;
|
362
|
+
/**
|
363
|
+
* If set the Calendar will not allow selection of dates in this array.
|
364
|
+
*/
|
365
|
+
restrictedDates?: Date[];
|
366
|
+
/**
|
367
|
+
* Whether the close button should be shown or not
|
368
|
+
* @default false
|
369
|
+
*/
|
370
|
+
showCloseButton?: boolean;
|
371
|
+
/**
|
372
|
+
* Allows all dates and buttons to be focused, including disabled ones
|
373
|
+
* @default false
|
374
|
+
*/
|
375
|
+
allFocusable?: boolean;
|
376
|
+
}
|
377
|
+
|
378
|
+
/**
|
379
|
+
* @internal
|
380
|
+
*/
|
381
|
+
export declare interface CalendarDayStyleProps extends CalendarDayGridStyleProps {
|
382
|
+
/**
|
383
|
+
* Accept custom classNames
|
384
|
+
*/
|
385
|
+
className?: string;
|
386
|
+
/**
|
387
|
+
* Whether the header is clickable
|
388
|
+
*/
|
389
|
+
headerIsClickable?: boolean;
|
390
|
+
/**
|
391
|
+
* Whether week numbers are being shown
|
392
|
+
*/
|
393
|
+
showWeekNumbers?: boolean;
|
394
|
+
}
|
395
|
+
|
396
|
+
/**
|
397
|
+
* @internal
|
398
|
+
*/
|
399
|
+
export declare interface CalendarDayStyles {
|
400
|
+
/**
|
401
|
+
* Style for the root element.
|
402
|
+
*/
|
403
|
+
root: string;
|
404
|
+
/**
|
405
|
+
* The style for the header button and forward/back navigation button container
|
406
|
+
*/
|
407
|
+
header: string;
|
408
|
+
/**
|
409
|
+
* The style for the title text inside the header
|
410
|
+
*/
|
411
|
+
monthAndYear: string;
|
412
|
+
/**
|
413
|
+
* The style for the wrapper around forward/back/close buttons
|
414
|
+
*/
|
415
|
+
monthComponents: string;
|
416
|
+
/**
|
417
|
+
* The style for the forward/back/close buttons
|
418
|
+
*/
|
419
|
+
headerIconButton: string;
|
420
|
+
/**
|
421
|
+
* The style to apply for disabled elements
|
422
|
+
*/
|
423
|
+
disabledStyle: string;
|
424
|
+
}
|
425
|
+
|
426
|
+
/**
|
427
|
+
* @internal
|
428
|
+
*/
|
429
|
+
export declare const CalendarMonth: React_2.FunctionComponent<CalendarMonthProps>;
|
430
|
+
|
431
|
+
export declare interface CalendarMonthProps {
|
432
|
+
/**
|
433
|
+
* Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing
|
434
|
+
* the public methods and properties of the component.
|
435
|
+
*/
|
436
|
+
componentRef?: React_2.RefObject<ICalendarMonth>;
|
437
|
+
/**
|
438
|
+
* Localized strings to use in the Calendar
|
439
|
+
*/
|
440
|
+
strings: CalendarStrings;
|
441
|
+
/**
|
442
|
+
* The currently selected date
|
443
|
+
*/
|
444
|
+
selectedDate: Date;
|
445
|
+
/**
|
446
|
+
* The currently navigated date
|
447
|
+
*/
|
448
|
+
navigatedDate: Date;
|
449
|
+
/**
|
450
|
+
* Callback issued when a month is selected
|
451
|
+
* @param date - The date the user selected
|
452
|
+
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
453
|
+
* for the component.
|
454
|
+
*/
|
455
|
+
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
456
|
+
/**
|
457
|
+
* Callback issued when the year is navigated
|
458
|
+
* @param date - The date that is navigated to
|
459
|
+
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
460
|
+
*/
|
461
|
+
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
462
|
+
/**
|
463
|
+
* Value of today. If unspecified, current time in client machine will be used.
|
464
|
+
*/
|
465
|
+
today?: Date;
|
466
|
+
/**
|
467
|
+
* Callback function when the header is selected
|
468
|
+
*/
|
469
|
+
onHeaderSelect?: () => void;
|
470
|
+
/**
|
471
|
+
* Apply additional formatting to dates, for example localized date formatting.
|
472
|
+
*/
|
473
|
+
dateTimeFormatter?: DateFormatting;
|
474
|
+
/**
|
475
|
+
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
476
|
+
*/
|
477
|
+
minDate?: Date;
|
478
|
+
/**
|
479
|
+
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
480
|
+
*/
|
481
|
+
maxDate?: Date;
|
482
|
+
/**
|
483
|
+
* Whether the month picker should highlight the current month
|
484
|
+
* @default false
|
485
|
+
*/
|
486
|
+
highlightCurrentMonth?: boolean;
|
487
|
+
/**
|
488
|
+
* Whether the month picker should highlight the selected month
|
489
|
+
* @default false
|
490
|
+
*/
|
491
|
+
highlightSelectedMonth?: boolean;
|
492
|
+
/**
|
493
|
+
* Allows all dates and buttons to be focused, including disabled ones
|
494
|
+
* @default false
|
495
|
+
*/
|
496
|
+
allFocusable?: boolean;
|
497
|
+
/**
|
498
|
+
* Additional CSS class(es) to apply to the CalendarMonth.
|
499
|
+
*/
|
500
|
+
className?: string;
|
501
|
+
/**
|
502
|
+
* Whether the year picker is hidden
|
503
|
+
* @default false
|
504
|
+
*/
|
505
|
+
yearPickerHidden?: boolean;
|
506
|
+
/**
|
507
|
+
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
508
|
+
*/
|
509
|
+
animationDirection?: AnimationDirection;
|
510
|
+
}
|
511
|
+
|
512
|
+
/**
|
513
|
+
* @internal
|
514
|
+
*/
|
515
|
+
export declare interface CalendarMonthStyleProps extends CalendarPickerStyleProps {
|
516
|
+
}
|
517
|
+
|
518
|
+
/**
|
519
|
+
* @internal
|
520
|
+
*/
|
521
|
+
export declare interface CalendarMonthStyles extends CalendarPickerStyles {
|
522
|
+
}
|
523
|
+
|
524
|
+
/**
|
525
|
+
* @internal
|
526
|
+
*/
|
527
|
+
export declare const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles>;
|
528
|
+
|
529
|
+
/**
|
530
|
+
* @internal
|
531
|
+
*/
|
532
|
+
export declare interface CalendarPickerStyleProps {
|
533
|
+
/**
|
534
|
+
* Accept custom classNames
|
535
|
+
*/
|
536
|
+
className?: string;
|
537
|
+
/**
|
538
|
+
* Whether the header can be clicked
|
539
|
+
*/
|
540
|
+
hasHeaderClickCallback?: boolean;
|
541
|
+
/**
|
542
|
+
* Whether the picker should highlight the current item
|
543
|
+
*/
|
544
|
+
highlightCurrent?: boolean;
|
545
|
+
/**
|
546
|
+
* Whether the picker should highlight the selected item
|
547
|
+
*/
|
548
|
+
highlightSelected?: boolean;
|
549
|
+
/**
|
550
|
+
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
551
|
+
*/
|
552
|
+
animationDirection?: AnimationDirection;
|
553
|
+
/**
|
554
|
+
* Whether grid entering animation should be forwards or backwards
|
555
|
+
*/
|
556
|
+
animateBackwards?: boolean;
|
557
|
+
}
|
558
|
+
|
559
|
+
/**
|
560
|
+
* @internal
|
561
|
+
*/
|
562
|
+
export declare interface CalendarPickerStyles {
|
563
|
+
/**
|
564
|
+
* Style for the root element.
|
565
|
+
*/
|
566
|
+
root: string;
|
567
|
+
headerContainer: string;
|
568
|
+
currentItemButton: string;
|
569
|
+
navigationButtonsContainer: string;
|
570
|
+
navigationButton: string;
|
571
|
+
gridContainer: string;
|
572
|
+
buttonRow: string;
|
573
|
+
itemButton: string;
|
574
|
+
current: string;
|
575
|
+
selected: string;
|
576
|
+
disabled: string;
|
577
|
+
}
|
578
|
+
|
579
|
+
export declare interface CalendarProps extends React_2.RefAttributes<HTMLDivElement> {
|
580
|
+
/**
|
581
|
+
* Optional callback to access the ICalendar interface. Use this instead of ref for accessing
|
582
|
+
* the public methods and properties of the component.
|
583
|
+
*/
|
584
|
+
componentRef?: React_2.RefObject<ICalendar>;
|
585
|
+
/**
|
586
|
+
* Customized props for the calendar day
|
587
|
+
*/
|
588
|
+
calendarDayProps?: Partial<CalendarDayProps>;
|
589
|
+
/**
|
590
|
+
* Customized props for the calendar month
|
591
|
+
*/
|
592
|
+
calendarMonthProps?: Partial<CalendarMonthProps>;
|
593
|
+
/**
|
594
|
+
* Optional class name to add to the root element.
|
595
|
+
*/
|
596
|
+
className?: string;
|
597
|
+
/**
|
598
|
+
* Callback for when a date is selected
|
599
|
+
* @param date - The date the user selected
|
600
|
+
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
601
|
+
* for the component.
|
602
|
+
*/
|
603
|
+
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
604
|
+
/**
|
605
|
+
* Callback for when calendar is closed
|
606
|
+
*/
|
607
|
+
onDismiss?: () => void;
|
608
|
+
/**
|
609
|
+
* ID for the calendar
|
610
|
+
*/
|
611
|
+
id?: string;
|
612
|
+
/**
|
613
|
+
* Default value of the Calendar, if any
|
614
|
+
*/
|
615
|
+
value?: Date;
|
616
|
+
/**
|
617
|
+
* Value of today. If unspecified, current time in client machine will be used.
|
618
|
+
*/
|
619
|
+
today?: Date;
|
620
|
+
/**
|
621
|
+
* The date range type indicating how many days should be selected as the user
|
622
|
+
* selects days
|
623
|
+
* @default DateRangeType.Day
|
624
|
+
*/
|
625
|
+
dateRangeType?: DateRangeType;
|
626
|
+
/**
|
627
|
+
* The first day of the week for your locale.
|
628
|
+
* @default DayOfWeek.Sunday
|
629
|
+
*/
|
630
|
+
firstDayOfWeek?: DayOfWeek;
|
631
|
+
/**
|
632
|
+
* Defines when the first week of the year should start.
|
633
|
+
* @default FirstWeekOfYear.FirstDay
|
634
|
+
*/
|
635
|
+
firstWeekOfYear?: FirstWeekOfYear;
|
636
|
+
/**
|
637
|
+
* Whether the month picker is shown beside the day picker or hidden.
|
638
|
+
* @default true
|
639
|
+
*/
|
640
|
+
isMonthPickerVisible?: boolean;
|
641
|
+
/**
|
642
|
+
* Whether the day picker is shown beside the month picker or hidden.
|
643
|
+
* @default true
|
644
|
+
*/
|
645
|
+
isDayPickerVisible?: boolean;
|
646
|
+
/**
|
647
|
+
* Show month picker on top of date picker when visible.
|
648
|
+
* @default false
|
649
|
+
*/
|
650
|
+
showMonthPickerAsOverlay?: boolean;
|
651
|
+
/**
|
652
|
+
* Whether the "Go to today" link should be shown or not
|
653
|
+
*/
|
654
|
+
showGoToToday?: boolean;
|
655
|
+
/**
|
656
|
+
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
657
|
+
* @default false
|
658
|
+
*/
|
659
|
+
showWeekNumbers?: boolean;
|
660
|
+
/**
|
661
|
+
* Localized strings to use in the Calendar
|
662
|
+
*/
|
663
|
+
strings?: CalendarStrings;
|
664
|
+
/**
|
665
|
+
* Apply additional formatting to dates, for example localized date formatting.
|
666
|
+
*/
|
667
|
+
dateTimeFormatter?: DateFormatting;
|
668
|
+
/**
|
669
|
+
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
670
|
+
*/
|
671
|
+
minDate?: Date;
|
672
|
+
/**
|
673
|
+
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
674
|
+
*/
|
675
|
+
maxDate?: Date;
|
676
|
+
/**
|
677
|
+
* If set the Calendar will not allow selection of dates in this array.
|
678
|
+
*/
|
679
|
+
restrictedDates?: Date[];
|
680
|
+
/**
|
681
|
+
* Whether the calendar should show 6 weeks by default.
|
682
|
+
* @default false
|
683
|
+
*/
|
684
|
+
showSixWeeksByDefault?: boolean;
|
685
|
+
/**
|
686
|
+
* The days that are selectable when `dateRangeType` is `WorkWeek`.
|
687
|
+
* If `dateRangeType` is not `WorkWeek` this property does nothing.
|
688
|
+
* @default [Monday,Tuesday,Wednesday,Thursday,Friday]
|
689
|
+
*/
|
690
|
+
workWeekDays?: DayOfWeek[];
|
691
|
+
/**
|
692
|
+
* Whether the month picker should highlight the current month
|
693
|
+
* @default false
|
694
|
+
*/
|
695
|
+
highlightCurrentMonth?: boolean;
|
696
|
+
/**
|
697
|
+
* Whether the month picker should highlight the selected month
|
698
|
+
* @default false
|
699
|
+
*/
|
700
|
+
highlightSelectedMonth?: boolean;
|
701
|
+
/**
|
702
|
+
* Whether the close button should be shown or not
|
703
|
+
* @default false
|
704
|
+
*/
|
705
|
+
showCloseButton?: boolean;
|
706
|
+
/**
|
707
|
+
* Allows all dates and buttons to be focused, including disabled ones
|
708
|
+
* @default false
|
709
|
+
*/
|
710
|
+
allFocusable?: boolean;
|
711
|
+
}
|
712
|
+
|
713
|
+
export declare interface CalendarStrings extends DateGridStrings {
|
714
|
+
/**
|
715
|
+
* String to render for button to direct the user to today's date.
|
716
|
+
*/
|
717
|
+
goToToday: string;
|
718
|
+
/**
|
719
|
+
* Aria-label for the "previous month" button in day picker.
|
720
|
+
*/
|
721
|
+
prevMonthAriaLabel?: string;
|
722
|
+
/**
|
723
|
+
* Aria-label for the "next month" button in day picker.
|
724
|
+
*/
|
725
|
+
nextMonthAriaLabel?: string;
|
726
|
+
/**
|
727
|
+
* Aria-label for the "previous year" button in month picker.
|
728
|
+
*/
|
729
|
+
prevYearAriaLabel?: string;
|
730
|
+
/**
|
731
|
+
* Aria-label for the "next year" button in month picker.
|
732
|
+
*/
|
733
|
+
nextYearAriaLabel?: string;
|
734
|
+
/**
|
735
|
+
* Aria-label for the "previous year range" button in year picker.
|
736
|
+
*/
|
737
|
+
prevYearRangeAriaLabel?: string;
|
738
|
+
/**
|
739
|
+
* Aria-label for the "next year range" button in year picker.
|
740
|
+
*/
|
741
|
+
nextYearRangeAriaLabel?: string;
|
742
|
+
/**
|
743
|
+
* Aria-label format string for the header button in the month picker. Should have 1 string param, e.g. "`{0}`,
|
744
|
+
* select to change the year". This aria-label will only be applied if the year picker is enabled; otherwise
|
745
|
+
* the label will default to the header string, e.g. "2019".
|
746
|
+
*/
|
747
|
+
monthPickerHeaderAriaLabel?: string;
|
748
|
+
/**
|
749
|
+
* Aria-label format string for the header button in the year picker.
|
750
|
+
* Should have 1 string param, e.g. "`{0}`, select to change the month"
|
751
|
+
*/
|
752
|
+
yearPickerHeaderAriaLabel?: string;
|
753
|
+
/**
|
754
|
+
* Aria-label for the "close" button.
|
755
|
+
*/
|
756
|
+
closeButtonAriaLabel?: string;
|
757
|
+
/**
|
758
|
+
* Aria-label format string for the week number header. Should have 1 string param, e.g. "week number `{0}`"
|
759
|
+
*/
|
760
|
+
weekNumberFormatString?: string;
|
761
|
+
/**
|
762
|
+
* Aria-label format string for the currently selected date. Should have 1 string param, e.g. "Selected date `{0}`"
|
763
|
+
*/
|
764
|
+
selectedDateFormatString?: string;
|
765
|
+
/**
|
766
|
+
* Aria-label format string for today's date. Should have 1 string param, e.g. "Today's date `{0}`"
|
767
|
+
*/
|
768
|
+
todayDateFormatString?: string;
|
769
|
+
/**
|
770
|
+
* Aria-label for when a date is marked
|
771
|
+
*/
|
772
|
+
dayMarkedAriaLabel?: string;
|
773
|
+
}
|
774
|
+
|
775
|
+
/**
|
776
|
+
* @internal
|
777
|
+
*/
|
778
|
+
export declare interface CalendarStyleProps {
|
779
|
+
/**
|
780
|
+
* Custom CSS class for the calendar.
|
781
|
+
*/
|
782
|
+
className?: string;
|
783
|
+
/**
|
784
|
+
* Whether the month picker is visible
|
785
|
+
*/
|
786
|
+
isMonthPickerVisible?: boolean;
|
787
|
+
/**
|
788
|
+
* Whether the day picker is visible
|
789
|
+
*/
|
790
|
+
isDayPickerVisible?: boolean;
|
791
|
+
/**
|
792
|
+
* Whether only month picker is shown
|
793
|
+
*/
|
794
|
+
monthPickerOnly?: boolean;
|
795
|
+
/**
|
796
|
+
* Whether the month picker is overlaid on the day picker
|
797
|
+
*/
|
798
|
+
showMonthPickerAsOverlay?: boolean;
|
799
|
+
/**
|
800
|
+
* @deprecated Use `overlaidWithButton`
|
801
|
+
*/
|
802
|
+
overlayedWithButton?: boolean;
|
803
|
+
/**
|
804
|
+
* Whether the month and day picker are overlaid and the 'go to today' button is shown
|
805
|
+
*/
|
806
|
+
overlaidWithButton?: boolean;
|
807
|
+
/**
|
808
|
+
* Whether the go to today button is shown
|
809
|
+
*/
|
810
|
+
showGoToToday?: boolean;
|
811
|
+
/**
|
812
|
+
* Whether the week numbers are shown
|
813
|
+
*/
|
814
|
+
showWeekNumbers?: boolean;
|
815
|
+
}
|
816
|
+
|
817
|
+
/**
|
818
|
+
* @internal
|
819
|
+
*/
|
820
|
+
export declare interface CalendarStyles {
|
821
|
+
/**
|
822
|
+
* Style for the root element.
|
823
|
+
*/
|
824
|
+
root: string;
|
825
|
+
divider: string;
|
826
|
+
goTodayButton: string;
|
827
|
+
monthPickerWrapper: string;
|
828
|
+
liveRegion: string;
|
829
|
+
}
|
830
|
+
|
831
|
+
/**
|
832
|
+
* @internal
|
833
|
+
*/
|
834
|
+
export declare const CalendarYear: React_2.FunctionComponent<CalendarYearProps>;
|
835
|
+
|
836
|
+
/**
|
837
|
+
* @internal
|
838
|
+
*/
|
839
|
+
export declare interface CalendarYearHeaderProps extends CalendarYearProps, CalendarYearRange {
|
840
|
+
/**
|
841
|
+
* Callback action when the 'previous' navigation button is selected
|
842
|
+
*/
|
843
|
+
onSelectPrev?: () => void;
|
844
|
+
/**
|
845
|
+
* Callback action when the 'next' navigation button is selected
|
846
|
+
*/
|
847
|
+
onSelectNext?: () => void;
|
848
|
+
/**
|
849
|
+
* Whether title entering animation should be forwards or backwards
|
850
|
+
*/
|
851
|
+
animateBackwards?: boolean;
|
852
|
+
}
|
853
|
+
|
854
|
+
/**
|
855
|
+
* @internal
|
856
|
+
*/
|
857
|
+
export declare interface CalendarYearProps {
|
858
|
+
/**
|
859
|
+
* Optional callback to access the ICalendarYear interface. Use this instead of ref for accessing
|
860
|
+
* the public methods and properties of the component.
|
861
|
+
*/
|
862
|
+
componentRef?: React_2.RefObject<ICalendarYear>;
|
863
|
+
/**
|
864
|
+
* Localized strings to use in the Calendar
|
865
|
+
*/
|
866
|
+
strings?: CalendarYearStrings;
|
867
|
+
/**
|
868
|
+
* The currently selected year
|
869
|
+
*/
|
870
|
+
selectedYear?: number;
|
871
|
+
/**
|
872
|
+
* The currently navigated year
|
873
|
+
*/
|
874
|
+
navigatedYear?: number;
|
875
|
+
/**
|
876
|
+
* Callback action when a year is selected
|
877
|
+
* @param year - The year the user selected
|
878
|
+
*/
|
879
|
+
onSelectYear?: (year: number) => void;
|
880
|
+
/**
|
881
|
+
* Callback action when the header is selected
|
882
|
+
*/
|
883
|
+
onHeaderSelect?: (focus: boolean) => void;
|
884
|
+
/**
|
885
|
+
* If set the Calendar will not allow navigation to or selection of a year earlier than this value.
|
886
|
+
*/
|
887
|
+
minYear?: number;
|
888
|
+
/**
|
889
|
+
* If set the Calendar will not allow navigation to or selection of a year later than this value.
|
890
|
+
*/
|
891
|
+
maxYear?: number;
|
892
|
+
/**
|
893
|
+
* Whether the year picker should highlight the current year
|
894
|
+
* @default false
|
895
|
+
*/
|
896
|
+
highlightCurrentYear?: boolean;
|
897
|
+
/**
|
898
|
+
* Whether the year picker should highlight the selected year
|
899
|
+
* @default false
|
900
|
+
*/
|
901
|
+
highlightSelectedYear?: boolean;
|
902
|
+
/**
|
903
|
+
* Accept custom classNames
|
904
|
+
*/
|
905
|
+
className?: string;
|
906
|
+
/**
|
907
|
+
* Custom renderer for the title
|
908
|
+
*/
|
909
|
+
onRenderTitle?: (props: CalendarYearHeaderProps) => React_2.ReactNode;
|
910
|
+
/**
|
911
|
+
* Custom renderer for the year
|
912
|
+
*/
|
913
|
+
onRenderYear?: (year: number) => React_2.ReactNode;
|
914
|
+
/**
|
915
|
+
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
916
|
+
*/
|
917
|
+
animationDirection?: AnimationDirection;
|
918
|
+
}
|
919
|
+
|
920
|
+
/**
|
921
|
+
* @internal
|
922
|
+
*/
|
923
|
+
export declare interface CalendarYearRange {
|
924
|
+
fromYear: number;
|
925
|
+
toYear: number;
|
926
|
+
}
|
927
|
+
|
928
|
+
/**
|
929
|
+
* @internal
|
930
|
+
*/
|
931
|
+
export declare interface CalendarYearRangeToString {
|
932
|
+
(range: CalendarYearRange): string;
|
933
|
+
}
|
934
|
+
|
935
|
+
/**
|
936
|
+
* @internal
|
937
|
+
*/
|
938
|
+
export declare interface CalendarYearStrings {
|
939
|
+
rangeAriaLabel?: string | CalendarYearRangeToString;
|
940
|
+
prevRangeAriaLabel?: string | CalendarYearRangeToString;
|
941
|
+
nextRangeAriaLabel?: string | CalendarYearRangeToString;
|
942
|
+
headerAriaLabelFormatString?: string;
|
943
|
+
}
|
944
|
+
|
945
|
+
/**
|
946
|
+
* @internal
|
947
|
+
*/
|
948
|
+
export declare interface CalendarYearStyleProps extends CalendarPickerStyleProps {
|
949
|
+
}
|
950
|
+
|
951
|
+
/**
|
952
|
+
* @internal
|
953
|
+
*/
|
954
|
+
export declare interface CalendarYearStyles extends CalendarPickerStyles {
|
955
|
+
}
|
956
|
+
|
957
|
+
/**
|
958
|
+
* Compare the date parts of two dates
|
959
|
+
* @param date1 - The first date to compare
|
960
|
+
* @param date2 - The second date to compare
|
961
|
+
* @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value
|
962
|
+
* if date1 is later than date2.
|
963
|
+
*/
|
964
|
+
export declare function compareDatePart(date1: Date, date2: Date): Number;
|
965
|
+
|
966
|
+
/**
|
967
|
+
* Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.
|
968
|
+
* @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.
|
969
|
+
*/
|
970
|
+
export declare function compareDates(date1: Date, date2: Date): boolean;
|
971
|
+
|
972
|
+
export declare interface DateFormatting {
|
973
|
+
/**
|
974
|
+
* Get a localized string for a day.
|
975
|
+
*/
|
976
|
+
formatDay: (date: Date) => string;
|
977
|
+
/**
|
978
|
+
* Get a localized string for a month.
|
979
|
+
*/
|
980
|
+
formatMonth: (date: Date, strings: DateGridStrings) => string;
|
981
|
+
/**
|
982
|
+
* Get a localized string for a year.
|
983
|
+
*/
|
984
|
+
formatYear: (date: Date) => string;
|
985
|
+
/**
|
986
|
+
* Get a localized string for a month, day, and year.
|
987
|
+
*/
|
988
|
+
formatMonthDayYear: (date: Date, strings: DateGridStrings) => string;
|
989
|
+
/**
|
990
|
+
* Get a localized string for a month and year.
|
991
|
+
*/
|
992
|
+
formatMonthYear: (date: Date, strings: DateGridStrings) => string;
|
993
|
+
}
|
994
|
+
|
995
|
+
export declare interface DateGridStrings {
|
996
|
+
/**
|
997
|
+
* An array of strings for the full names of months.
|
998
|
+
* The array is 0-based, so months[0] should be the full name of January.
|
999
|
+
*/
|
1000
|
+
months: string[];
|
1001
|
+
/**
|
1002
|
+
* An array of strings for the short names of months.
|
1003
|
+
* The array is 0-based, so shortMonths[0] should be the short name of January.
|
1004
|
+
*/
|
1005
|
+
shortMonths: string[];
|
1006
|
+
/**
|
1007
|
+
* An array of strings for the full names of days of the week.
|
1008
|
+
* The array is 0-based, so days[0] should be the full name of Sunday.
|
1009
|
+
*/
|
1010
|
+
days: string[];
|
1011
|
+
/**
|
1012
|
+
* An array of strings for the initials of the days of the week.
|
1013
|
+
* The array is 0-based, so days[0] should be the initial of Sunday.
|
1014
|
+
*/
|
1015
|
+
shortDays: string[];
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
/**
|
1019
|
+
* The supported date range types
|
1020
|
+
*/
|
1021
|
+
export declare enum DateRangeType {
|
1022
|
+
Day = 0,
|
1023
|
+
Week = 1,
|
1024
|
+
Month = 2,
|
1025
|
+
WorkWeek = 3
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
declare interface Day {
|
1029
|
+
/** `Date.toString()` value of current date */
|
1030
|
+
key: string;
|
1031
|
+
/** `Date.getDate()` value of current date */
|
1032
|
+
date: string;
|
1033
|
+
/** `Date` object of current date */
|
1034
|
+
originalDate: Date;
|
1035
|
+
/** Is current date is in the same month as "today" date */
|
1036
|
+
isInMonth: boolean;
|
1037
|
+
/** Is current date is "today" date */
|
1038
|
+
isToday: boolean;
|
1039
|
+
/** Is current date is selected */
|
1040
|
+
isSelected: boolean;
|
1041
|
+
/** Is current date within restriction boundaries */
|
1042
|
+
isInBounds: boolean;
|
1043
|
+
/** Is current date marked */
|
1044
|
+
isMarked: boolean;
|
1045
|
+
}
|
1046
|
+
|
1047
|
+
declare interface DayGridOptions extends RestrictedDatesOptions {
|
1048
|
+
/**
|
1049
|
+
* The first day of the week for your locale.
|
1050
|
+
*/
|
1051
|
+
firstDayOfWeek: DayOfWeek;
|
1052
|
+
/**
|
1053
|
+
* Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
|
1054
|
+
* FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
|
1055
|
+
*/
|
1056
|
+
firstWeekOfYear: FirstWeekOfYear;
|
1057
|
+
/**
|
1058
|
+
* The date range type indicating how many days should be selected as the user
|
1059
|
+
* selects days
|
1060
|
+
*/
|
1061
|
+
dateRangeType: DateRangeType;
|
1062
|
+
/**
|
1063
|
+
* The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
|
1064
|
+
* views.
|
1065
|
+
*/
|
1066
|
+
daysToSelectInDayView?: number;
|
1067
|
+
/**
|
1068
|
+
* Value of today. If unspecified, current time in client machine will be used.
|
1069
|
+
*/
|
1070
|
+
today?: Date;
|
1071
|
+
/**
|
1072
|
+
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
1073
|
+
*/
|
1074
|
+
showWeekNumbers?: boolean;
|
1075
|
+
/**
|
1076
|
+
* The days that are selectable when `dateRangeType` is WorkWeek.
|
1077
|
+
* If `dateRangeType` is not WorkWeek this property does nothing.
|
1078
|
+
*/
|
1079
|
+
workWeekDays?: DayOfWeek[];
|
1080
|
+
/**
|
1081
|
+
* Which days in the generated grid should be marked.
|
1082
|
+
*/
|
1083
|
+
markedDays?: Date[];
|
1084
|
+
/**
|
1085
|
+
* The currently selected date
|
1086
|
+
*/
|
1087
|
+
selectedDate: Date;
|
1088
|
+
/**
|
1089
|
+
* The currently navigated date
|
1090
|
+
*/
|
1091
|
+
navigatedDate: Date;
|
1092
|
+
/**
|
1093
|
+
* How many weeks to show by default. If not provided, will show enough weeks to display the current
|
1094
|
+
* month, between 4 and 6 depending
|
1095
|
+
*/
|
1096
|
+
weeksToShow?: number;
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
export declare interface DayInfo extends Day {
|
1100
|
+
onSelected: () => void;
|
1101
|
+
setRef(element: HTMLElement | null): void;
|
1102
|
+
}
|
1103
|
+
|
1104
|
+
/**
|
1105
|
+
* The days of the week
|
1106
|
+
*/
|
1107
|
+
export declare enum DayOfWeek {
|
1108
|
+
Sunday = 0,
|
1109
|
+
Monday = 1,
|
1110
|
+
Tuesday = 2,
|
1111
|
+
Wednesday = 3,
|
1112
|
+
Thursday = 4,
|
1113
|
+
Friday = 5,
|
1114
|
+
Saturday = 6
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
export declare const DAYS_IN_WEEK = 7;
|
1118
|
+
|
1119
|
+
export declare const DEFAULT_CALENDAR_STRINGS: CalendarStrings;
|
1120
|
+
|
1121
|
+
export declare const DEFAULT_DATE_FORMATTING: DateFormatting;
|
1122
|
+
|
1123
|
+
export declare const DEFAULT_DATE_GRID_STRINGS: DateGridStrings;
|
1124
|
+
|
1125
|
+
export declare const defaultCalendarStrings: CalendarStrings;
|
1126
|
+
|
1127
|
+
/**
|
1128
|
+
* @internal
|
1129
|
+
*/
|
1130
|
+
export declare const extraCalendarDayGridClassNames: {
|
1131
|
+
hoverStyle: string;
|
1132
|
+
pressedStyle: string;
|
1133
|
+
};
|
1134
|
+
|
1135
|
+
/**
|
1136
|
+
* First week of the year settings types
|
1137
|
+
*/
|
1138
|
+
export declare enum FirstWeekOfYear {
|
1139
|
+
FirstDay = 0,
|
1140
|
+
FirstFullWeek = 1,
|
1141
|
+
FirstFourDayWeek = 2
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
/**
|
1145
|
+
* Helper function to assist in date comparisons
|
1146
|
+
*/
|
1147
|
+
export declare function getDatePartHashValue(date: Date): number;
|
1148
|
+
|
1149
|
+
/**
|
1150
|
+
* Gets the date range array including the specified date. The date range array is calculated as the list
|
1151
|
+
* of dates accounting for the specified first day of the week and date range type.
|
1152
|
+
* @param date - The input date
|
1153
|
+
* @param dateRangeType - The desired date range type, i.e., day, week, month, etc.
|
1154
|
+
* @param firstDayOfWeek - The first day of the week.
|
1155
|
+
* @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.
|
1156
|
+
* @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day
|
1157
|
+
* for multiday view. Defaults to 1
|
1158
|
+
* @returns An array of dates representing the date range containing the specified date.
|
1159
|
+
*/
|
1160
|
+
export declare function getDateRangeArray(date: Date, dateRangeType: DateRangeType, firstDayOfWeek: DayOfWeek, workWeekDays?: DayOfWeek[], daysToSelectInDayView?: number): Date[];
|
1161
|
+
|
1162
|
+
/**
|
1163
|
+
* Gets the date for the last day of the week based on the given date assuming
|
1164
|
+
* the specified first day of the week.
|
1165
|
+
* @param date - The date to find the beginning of the week date for.
|
1166
|
+
* @returns A new date object representing the first day of the week containing the input date.
|
1167
|
+
*/
|
1168
|
+
export declare function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
|
1169
|
+
|
1170
|
+
/**
|
1171
|
+
* Returns a date that is the last day of the month of the provided date.
|
1172
|
+
* @param date - The origin date
|
1173
|
+
* @returns A new Date object with the day set to the last day of the month.
|
1174
|
+
*/
|
1175
|
+
export declare function getMonthEnd(date: Date): Date;
|
1176
|
+
|
1177
|
+
/**
|
1178
|
+
* Returns a date that is the first day of the month of the provided date.
|
1179
|
+
* @param date - The origin date
|
1180
|
+
* @returns A new Date object with the day set to the first day of the month.
|
1181
|
+
*/
|
1182
|
+
export declare function getMonthStart(date: Date): Date;
|
1183
|
+
|
1184
|
+
/**
|
1185
|
+
* Gets the date for the first day of the week based on the given date assuming
|
1186
|
+
* the specified first day of the week.
|
1187
|
+
* @param date - The date to find the beginning of the week date for.
|
1188
|
+
* @returns A new date object representing the first day of the week containing the input date.
|
1189
|
+
*/
|
1190
|
+
export declare function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
|
1191
|
+
|
1192
|
+
/**
|
1193
|
+
* Returns the week number for a date.
|
1194
|
+
* Week numbers are 1 - 52 (53) in a year
|
1195
|
+
* @param date - A date to find the week number for.
|
1196
|
+
* @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
|
1197
|
+
* @param firstWeekOfYear - The first week of the year (1-2)
|
1198
|
+
* @returns The week's number in the year.
|
1199
|
+
*/
|
1200
|
+
export declare function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number;
|
1201
|
+
|
1202
|
+
/**
|
1203
|
+
* Returns the week number for a date.
|
1204
|
+
* Week numbers are 1 - 52 (53) in a year
|
1205
|
+
* @param navigatedDate - A date to find the week number for.
|
1206
|
+
* @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
|
1207
|
+
* @param firstWeekOfYear - The first week of the year (1-2)
|
1208
|
+
* @returns The weeks number array for the current month.
|
1209
|
+
*/
|
1210
|
+
export declare function getWeekNumbersInMonth(weeksInMonth: number, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear, navigatedDate: Date): number[];
|
1211
|
+
|
1212
|
+
/**
|
1213
|
+
* Returns a date that is the last day of the year of the provided date.
|
1214
|
+
* @param date - The origin date
|
1215
|
+
* @returns A new Date object with the day set to the last day of the year.
|
1216
|
+
*/
|
1217
|
+
export declare function getYearEnd(date: Date): Date;
|
1218
|
+
|
1219
|
+
/**
|
1220
|
+
* Returns a date that is the first day of the year of the provided date.
|
1221
|
+
* @param date - The origin date
|
1222
|
+
* @returns A new Date object with the day set to the first day of the year.
|
1223
|
+
*/
|
1224
|
+
export declare function getYearStart(date: Date): Date;
|
1225
|
+
|
1226
|
+
export declare interface ICalendar {
|
1227
|
+
/** Sets focus to the selected date. */
|
1228
|
+
focus: () => void;
|
1229
|
+
}
|
1230
|
+
|
1231
|
+
export declare interface ICalendarDay {
|
1232
|
+
focus(): void;
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
/**
|
1236
|
+
* @internal
|
1237
|
+
*/
|
1238
|
+
export declare interface ICalendarDayGrid {
|
1239
|
+
focus(): void;
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
export declare interface ICalendarMonth {
|
1243
|
+
focus(): void;
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
/**
|
1247
|
+
* @internal
|
1248
|
+
*/
|
1249
|
+
export declare interface ICalendarYear {
|
1250
|
+
focus(): void;
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
/**
|
1254
|
+
* Checks whether the specified date is in the given date range.
|
1255
|
+
* @param date - The origin date
|
1256
|
+
* @param dateRange - An array of dates to do the lookup on
|
1257
|
+
* @returns True if the date matches one of the dates in the specified array, false otherwise.
|
1258
|
+
*/
|
1259
|
+
export declare function isInDateRangeArray(date: Date, dateRange: Date[]): boolean;
|
1260
|
+
|
1261
|
+
/**
|
1262
|
+
* The months
|
1263
|
+
*/
|
1264
|
+
export declare enum MonthOfYear {
|
1265
|
+
January = 0,
|
1266
|
+
February = 1,
|
1267
|
+
March = 2,
|
1268
|
+
April = 3,
|
1269
|
+
May = 4,
|
1270
|
+
June = 5,
|
1271
|
+
July = 6,
|
1272
|
+
August = 7,
|
1273
|
+
September = 8,
|
1274
|
+
October = 9,
|
1275
|
+
November = 10,
|
1276
|
+
December = 11
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
declare interface RestrictedDatesOptions {
|
1280
|
+
/**
|
1281
|
+
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
1282
|
+
*/
|
1283
|
+
minDate?: Date;
|
1284
|
+
/**
|
1285
|
+
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
1286
|
+
*/
|
1287
|
+
maxDate?: Date;
|
1288
|
+
/**
|
1289
|
+
* If set the Calendar will not allow selection of dates in this array.
|
1290
|
+
*/
|
1291
|
+
restrictedDates?: Date[];
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
/**
|
1295
|
+
* Returns a date that is a copy of the given date, aside from the month changing to the given month.
|
1296
|
+
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
1297
|
+
* to contain the original day-of-month, we'll use the last day of the new month.
|
1298
|
+
* @param date - The origin date
|
1299
|
+
* @param month - The 0-based index of the month to set on the date.
|
1300
|
+
* @returns A new Date object with the given month set.
|
1301
|
+
*/
|
1302
|
+
export declare function setMonth(date: Date, month: number): Date;
|
1303
|
+
|
1304
|
+
export declare const TimeConstants: {
|
1305
|
+
MillisecondsInOneDay: number;
|
1306
|
+
MillisecondsIn1Sec: number;
|
1307
|
+
MillisecondsIn1Min: number;
|
1308
|
+
MillisecondsIn30Mins: number;
|
1309
|
+
MillisecondsIn1Hour: number;
|
1310
|
+
MinutesInOneDay: number;
|
1311
|
+
MinutesInOneHour: number;
|
1312
|
+
DaysInOneWeek: number;
|
1313
|
+
MonthInOneYear: number;
|
1314
|
+
HoursInOneDay: number;
|
1315
|
+
SecondsInOneMinute: number;
|
1316
|
+
OffsetTo24HourFormat: number;
|
1317
|
+
/**
|
1318
|
+
* Matches a time string. Groups:
|
1319
|
+
* 1. hours (with or without leading 0)
|
1320
|
+
* 2. minutes
|
1321
|
+
* 3. seconds (optional)
|
1322
|
+
* 4. meridiem (am/pm, case-insensitive, optional)
|
1323
|
+
*/
|
1324
|
+
TimeFormatRegex: RegExp;
|
1325
|
+
};
|
1326
|
+
|
1327
|
+
/**
|
1328
|
+
* @internal
|
1329
|
+
*
|
1330
|
+
* Apply styling to the CalendarDayGrid slots based on the state
|
1331
|
+
*/
|
1332
|
+
export declare const useCalendarDayGridStyles_unstable: (props: CalendarDayGridStyleProps) => CalendarDayGridStyles;
|
1333
|
+
|
1334
|
+
/**
|
1335
|
+
* @internal
|
1336
|
+
*
|
1337
|
+
* Apply styling to the CalendarDay slots based on the state
|
1338
|
+
*/
|
1339
|
+
export declare const useCalendarDayStyles_unstable: (props: CalendarDayStyleProps) => CalendarDayStyles;
|
1340
|
+
|
1341
|
+
/**
|
1342
|
+
* @internal
|
1343
|
+
*
|
1344
|
+
* Apply styling to the CalendarMonth slots based on the state
|
1345
|
+
*/
|
1346
|
+
export declare const useCalendarMonthStyles_unstable: (props: CalendarMonthStyleProps) => CalendarMonthStyles;
|
1347
|
+
|
1348
|
+
/**
|
1349
|
+
* @internal
|
1350
|
+
*
|
1351
|
+
* Apply styling to the CalendarPicker slots based on the state
|
1352
|
+
*/
|
1353
|
+
export declare const useCalendarPickerStyles_unstable: (props: CalendarPickerStyleProps) => CalendarPickerStyles;
|
1354
|
+
|
1355
|
+
/**
|
1356
|
+
* @internal
|
1357
|
+
*
|
1358
|
+
* Apply styling to the Calendar slots based on the state
|
1359
|
+
*/
|
1360
|
+
export declare const useCalendarStyles_unstable: (props: CalendarStyleProps) => CalendarStyles;
|
1361
|
+
|
1362
|
+
/**
|
1363
|
+
* @internal
|
1364
|
+
*
|
1365
|
+
* Apply styling to the CalendarYear slots based on the state
|
1366
|
+
*/
|
1367
|
+
export declare const useCalendarYearStyles_unstable: (props: CalendarYearStyleProps) => CalendarYearStyles;
|
1368
|
+
|
1369
|
+
/**
|
1370
|
+
* @internal
|
1371
|
+
*/
|
1372
|
+
export declare interface WeekCorners {
|
1373
|
+
[key: string]: string;
|
1374
|
+
}
|
1375
|
+
|
1376
|
+
export { }
|