@fluentui/react-datepicker-compat 0.3.22 → 0.4.1
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 +97 -1
- package/CHANGELOG.md +31 -2
- package/dist/index.d.ts +5 -917
- package/lib/components/DatePicker/DatePicker.types.js.map +1 -1
- package/lib/components/DatePicker/defaults.js +1 -1
- package/lib/components/DatePicker/defaults.js.map +1 -1
- package/lib/components/DatePicker/useDatePicker.js +1 -2
- package/lib/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/DatePicker/defaults.js +2 -2
- package/lib-commonjs/components/DatePicker/defaults.js.map +1 -1
- package/lib-commonjs/components/DatePicker/useDatePicker.js +5 -6
- package/lib-commonjs/components/DatePicker/useDatePicker.js.map +1 -1
- package/lib-commonjs/index.js +0 -77
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -8
- package/lib/Calendar.js +0 -1
- package/lib/Calendar.js.map +0 -1
- package/lib/CalendarDay.js +0 -1
- package/lib/CalendarDay.js.map +0 -1
- package/lib/CalendarDayGrid.js +0 -1
- package/lib/CalendarDayGrid.js.map +0 -1
- package/lib/CalendarMonth.js +0 -1
- package/lib/CalendarMonth.js.map +0 -1
- package/lib/CalendarPicker.js +0 -1
- package/lib/CalendarPicker.js.map +0 -1
- package/lib/CalendarYear.js +0 -1
- package/lib/CalendarYear.js.map +0 -1
- package/lib/components/Calendar/Calendar.js +0 -302
- package/lib/components/Calendar/Calendar.js.map +0 -1
- package/lib/components/Calendar/Calendar.types.js +0 -10
- package/lib/components/Calendar/Calendar.types.js.map +0 -1
- package/lib/components/Calendar/defaults.js +0 -2
- package/lib/components/Calendar/defaults.js.map +0 -1
- package/lib/components/Calendar/index.js +0 -4
- package/lib/components/Calendar/index.js.map +0 -1
- package/lib/components/Calendar/useCalendarStyles.styles.js +0 -167
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +0 -1
- package/lib/components/CalendarDay/CalendarDay.js +0 -111
- package/lib/components/CalendarDay/CalendarDay.js.map +0 -1
- package/lib/components/CalendarDay/CalendarDay.types.js +0 -1
- package/lib/components/CalendarDay/CalendarDay.types.js.map +0 -1
- package/lib/components/CalendarDay/index.js +0 -3
- package/lib/components/CalendarDay/index.js.map +0 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +0 -180
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +0 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +0 -168
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +0 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +0 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +0 -164
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +0 -1
- package/lib/components/CalendarDayGrid/CalendarGridRow.js +0 -26
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +0 -1
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +0 -36
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +0 -1
- package/lib/components/CalendarDayGrid/index.js +0 -4
- package/lib/components/CalendarDayGrid/index.js.map +0 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +0 -437
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +0 -1
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +0 -98
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +0 -1
- package/lib/components/CalendarDayGrid/useWeeks.js +0 -45
- package/lib/components/CalendarDayGrid/useWeeks.js.map +0 -1
- package/lib/components/CalendarMonth/CalendarMonth.js +0 -263
- package/lib/components/CalendarMonth/CalendarMonth.js.map +0 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js +0 -1
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +0 -1
- package/lib/components/CalendarMonth/index.js +0 -3
- package/lib/components/CalendarMonth/index.js.map +0 -1
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +0 -8
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +0 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js +0 -1
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +0 -1
- package/lib/components/CalendarPicker/index.js +0 -2
- package/lib/components/CalendarPicker/index.js.map +0 -1
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +0 -371
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +0 -1
- package/lib/components/CalendarYear/CalendarYear.js +0 -298
- package/lib/components/CalendarYear/CalendarYear.js.map +0 -1
- package/lib/components/CalendarYear/CalendarYear.types.js +0 -1
- package/lib/components/CalendarYear/CalendarYear.types.js.map +0 -1
- package/lib/components/CalendarYear/index.js +0 -3
- package/lib/components/CalendarYear/index.js.map +0 -1
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +0 -10
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +0 -1
- package/lib/utils/animations.js +0 -97
- package/lib/utils/animations.js.map +0 -1
- package/lib/utils/constants.js +0 -62
- package/lib/utils/constants.js.map +0 -1
- package/lib/utils/dateFormatting/dateFormatting.defaults.js +0 -95
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +0 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js +0 -1
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +0 -1
- package/lib/utils/dateFormatting/index.js +0 -2
- package/lib/utils/dateFormatting/index.js.map +0 -1
- package/lib/utils/dateGrid/dateGrid.types.js +0 -1
- package/lib/utils/dateGrid/dateGrid.types.js.map +0 -1
- package/lib/utils/dateGrid/findAvailableDate.js +0 -22
- package/lib/utils/dateGrid/findAvailableDate.js.map +0 -1
- package/lib/utils/dateGrid/getBoundedDateRange.js +0 -18
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +0 -1
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js +0 -16
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +0 -1
- package/lib/utils/dateGrid/getDayGrid.js +0 -71
- package/lib/utils/dateGrid/getDayGrid.js.map +0 -1
- package/lib/utils/dateGrid/index.js +0 -5
- package/lib/utils/dateGrid/index.js.map +0 -1
- package/lib/utils/dateGrid/isAfterMaxDate.js +0 -9
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +0 -1
- package/lib/utils/dateGrid/isBeforeMinDate.js +0 -9
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +0 -1
- package/lib/utils/dateGrid/isContiguous.js +0 -18
- package/lib/utils/dateGrid/isContiguous.js.map +0 -1
- package/lib/utils/dateGrid/isRestrictedDate.js +0 -15
- package/lib/utils/dateGrid/isRestrictedDate.js.map +0 -1
- package/lib/utils/dateMath/dateMath.js +0 -339
- package/lib/utils/dateMath/dateMath.js.map +0 -1
- package/lib/utils/dateMath/index.js +0 -1
- package/lib/utils/dateMath/index.js.map +0 -1
- package/lib/utils/dom.js +0 -8
- package/lib/utils/dom.js.map +0 -1
- package/lib/utils/focus.js +0 -26
- package/lib/utils/focus.js.map +0 -1
- package/lib/utils/index.js +0 -7
- package/lib/utils/index.js.map +0 -1
- package/lib-commonjs/Calendar.js +0 -6
- package/lib-commonjs/Calendar.js.map +0 -1
- package/lib-commonjs/CalendarDay.js +0 -6
- package/lib-commonjs/CalendarDay.js.map +0 -1
- package/lib-commonjs/CalendarDayGrid.js +0 -6
- package/lib-commonjs/CalendarDayGrid.js.map +0 -1
- package/lib-commonjs/CalendarMonth.js +0 -6
- package/lib-commonjs/CalendarMonth.js.map +0 -1
- package/lib-commonjs/CalendarPicker.js +0 -6
- package/lib-commonjs/CalendarPicker.js.map +0 -1
- package/lib-commonjs/CalendarYear.js +0 -6
- package/lib-commonjs/CalendarYear.js.map +0 -1
- package/lib-commonjs/components/Calendar/Calendar.js +0 -311
- package/lib-commonjs/components/Calendar/Calendar.js.map +0 -1
- package/lib-commonjs/components/Calendar/Calendar.types.js +0 -21
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +0 -1
- package/lib-commonjs/components/Calendar/defaults.js +0 -12
- package/lib-commonjs/components/Calendar/defaults.js.map +0 -1
- package/lib-commonjs/components/Calendar/index.js +0 -15
- package/lib-commonjs/components/Calendar/index.js.map +0 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +0 -339
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +0 -120
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +0 -1
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +0 -6
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +0 -1
- package/lib-commonjs/components/CalendarDay/index.js +0 -8
- package/lib-commonjs/components/CalendarDay/index.js.map +0 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +0 -357
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +0 -179
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +0 -6
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +0 -173
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +0 -35
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +0 -45
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/index.js +0 -22
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +0 -890
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +0 -105
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +0 -54
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +0 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +0 -272
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +0 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +0 -6
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +0 -1
- package/lib-commonjs/components/CalendarMonth/index.js +0 -8
- package/lib-commonjs/components/CalendarMonth/index.js.map +0 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +0 -14
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +0 -4
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +0 -1
- package/lib-commonjs/components/CalendarPicker/index.js +0 -7
- package/lib-commonjs/components/CalendarPicker/index.js.map +0 -1
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +0 -742
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +0 -307
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +0 -1
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +0 -6
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +0 -1
- package/lib-commonjs/components/CalendarYear/index.js +0 -8
- package/lib-commonjs/components/CalendarYear/index.js.map +0 -1
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +0 -14
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +0 -1
- package/lib-commonjs/utils/animations.js +0 -154
- package/lib-commonjs/utils/animations.js.map +0 -1
- package/lib-commonjs/utils/constants.js +0 -92
- package/lib-commonjs/utils/constants.js.map +0 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +0 -116
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +0 -1
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +0 -4
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +0 -1
- package/lib-commonjs/utils/dateFormatting/index.js +0 -7
- package/lib-commonjs/utils/dateFormatting/index.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js +0 -4
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js +0 -29
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +0 -23
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +0 -20
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +0 -76
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/index.js +0 -10
- package/lib-commonjs/utils/dateGrid/index.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +0 -15
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +0 -15
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/isContiguous.js +0 -28
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +0 -1
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +0 -21
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +0 -1
- package/lib-commonjs/utils/dateMath/dateMath.js +0 -308
- package/lib-commonjs/utils/dateMath/dateMath.js.map +0 -1
- package/lib-commonjs/utils/dateMath/index.js +0 -6
- package/lib-commonjs/utils/dateMath/index.js.map +0 -1
- package/lib-commonjs/utils/dom.js +0 -18
- package/lib-commonjs/utils/dom.js.map +0 -1
- package/lib-commonjs/utils/focus.js +0 -31
- package/lib-commonjs/utils/focus.js.map +0 -1
- package/lib-commonjs/utils/index.js +0 -12
- package/lib-commonjs/utils/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
|
+
import type { CalendarProps } from '@fluentui/react-calendar-compat';
|
|
4
|
+
import type { CalendarStrings } from '@fluentui/react-calendar-compat';
|
|
3
5
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
4
6
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
7
|
+
import type { DateFormatting } from '@fluentui/react-calendar-compat';
|
|
8
|
+
import { DayOfWeek } from '@fluentui/react-calendar-compat';
|
|
9
|
+
import { FirstWeekOfYear } from '@fluentui/react-calendar-compat';
|
|
5
10
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
6
11
|
import { Input } from '@fluentui/react-input';
|
|
7
12
|
import type { PortalProps } from '@fluentui/react-portal';
|
|
@@ -10,661 +15,6 @@ import * as React_2 from 'react';
|
|
|
10
15
|
import type { Slot } from '@fluentui/react-utilities';
|
|
11
16
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
12
17
|
|
|
13
|
-
/**
|
|
14
|
-
* Returns a date offset from the given date by the specified number of days.
|
|
15
|
-
* @param date - The origin date
|
|
16
|
-
* @param days - The number of days to offset. 'days' can be negative.
|
|
17
|
-
* @returns A new Date object offset from the origin date by the given number of days
|
|
18
|
-
*/
|
|
19
|
-
export declare function addDays(date: Date, days: number): Date;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Returns a date offset from the given date by the specified number of months.
|
|
23
|
-
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
|
24
|
-
* to contain the original day-of-month, we'll use the last day of the new month.
|
|
25
|
-
* @param date - The origin date
|
|
26
|
-
* @param months - The number of months to offset. 'months' can be negative.
|
|
27
|
-
* @returns A new Date object offset from the origin date by the given number of months
|
|
28
|
-
*/
|
|
29
|
-
export declare function addMonths(date: Date, months: number): Date;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Returns a date offset from the given date by the specified number of weeks.
|
|
33
|
-
* @param date - The origin date
|
|
34
|
-
* @param weeks - The number of weeks to offset. 'weeks' can be negative.
|
|
35
|
-
* @returns A new Date object offset from the origin date by the given number of weeks
|
|
36
|
-
*/
|
|
37
|
-
export declare function addWeeks(date: Date, weeks: number): Date;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Returns a date offset from the given date by the specified number of years.
|
|
41
|
-
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
|
42
|
-
* to contain the original day-of-month, we'll use the last day of the new month.
|
|
43
|
-
* @param date - The origin date
|
|
44
|
-
* @param years - The number of years to offset. 'years' can be negative.
|
|
45
|
-
* @returns A new Date object offset from the origin date by the given number of years
|
|
46
|
-
*/
|
|
47
|
-
export declare function addYears(date: Date, years: number): Date;
|
|
48
|
-
|
|
49
|
-
export declare enum AnimationDirection {
|
|
50
|
-
/**
|
|
51
|
-
* Grid will transition out and in horizontally
|
|
52
|
-
*/
|
|
53
|
-
Horizontal = 0,
|
|
54
|
-
/**
|
|
55
|
-
* Grid will transition out and in vertically
|
|
56
|
-
*/
|
|
57
|
-
Vertical = 1
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
declare interface CalendarDayGridProps extends DayGridOptions {
|
|
64
|
-
/**
|
|
65
|
-
* Optional callback to access the ICalendarDayGrid interface. Use this instead of ref for accessing
|
|
66
|
-
* the public methods and properties of the component.
|
|
67
|
-
*/
|
|
68
|
-
componentRef?: React_2.RefObject<ICalendarDayGrid>;
|
|
69
|
-
/**
|
|
70
|
-
* Additional CSS class(es) to apply to the CalendarDayGrid.
|
|
71
|
-
*/
|
|
72
|
-
className?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Localized strings to use in the CalendarDayGrid
|
|
75
|
-
*/
|
|
76
|
-
strings: CalendarStrings;
|
|
77
|
-
/**
|
|
78
|
-
* The currently selected date
|
|
79
|
-
*/
|
|
80
|
-
selectedDate: Date;
|
|
81
|
-
/**
|
|
82
|
-
* The currently navigated date
|
|
83
|
-
*/
|
|
84
|
-
navigatedDate: Date;
|
|
85
|
-
/**
|
|
86
|
-
* Callback issued when a date is selected
|
|
87
|
-
* @param date - The date the user selected
|
|
88
|
-
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
|
89
|
-
* for the component.
|
|
90
|
-
*/
|
|
91
|
-
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
|
92
|
-
/**
|
|
93
|
-
* Callback issued when a date in the calendar is navigated
|
|
94
|
-
* @param date - The date that is navigated to
|
|
95
|
-
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
|
96
|
-
*/
|
|
97
|
-
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
|
98
|
-
/**
|
|
99
|
-
* Callback issued when calendar day is closed
|
|
100
|
-
*/
|
|
101
|
-
onDismiss?: () => void;
|
|
102
|
-
/**
|
|
103
|
-
* The first day of the week for your locale.
|
|
104
|
-
* @default DayOfWeek.Sunday
|
|
105
|
-
*/
|
|
106
|
-
firstDayOfWeek: DayOfWeek;
|
|
107
|
-
/**
|
|
108
|
-
* Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
|
|
109
|
-
* FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
|
|
110
|
-
* @default FirstWeekOfYear.FirstDay
|
|
111
|
-
*/
|
|
112
|
-
firstWeekOfYear: FirstWeekOfYear;
|
|
113
|
-
/**
|
|
114
|
-
* The date range type indicating how many days should be selected as the user
|
|
115
|
-
* selects days
|
|
116
|
-
* @default DateRangeType.Day
|
|
117
|
-
*/
|
|
118
|
-
dateRangeType: DateRangeType;
|
|
119
|
-
/**
|
|
120
|
-
* The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
|
|
121
|
-
* views.
|
|
122
|
-
* @default 1
|
|
123
|
-
*/
|
|
124
|
-
daysToSelectInDayView?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Value of today. If unspecified, current time in client machine will be used.
|
|
127
|
-
*/
|
|
128
|
-
today?: Date;
|
|
129
|
-
/**
|
|
130
|
-
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
|
131
|
-
* @default false
|
|
132
|
-
*/
|
|
133
|
-
showWeekNumbers?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Apply additional formatting to dates, for example localized date formatting.
|
|
136
|
-
*/
|
|
137
|
-
dateTimeFormatter: DateFormatting;
|
|
138
|
-
/**
|
|
139
|
-
* Ref callback for individual days. Allows for customization of the styling, properties, or listeners of the
|
|
140
|
-
* specific day.
|
|
141
|
-
*/
|
|
142
|
-
customDayCellRef?: (element: HTMLElement, date: Date, classNames: CalendarDayGridStyles) => void;
|
|
143
|
-
/**
|
|
144
|
-
* How many weeks to show by default. If not provided, will show enough weeks to display the current
|
|
145
|
-
* month, between 4 and 6 depending
|
|
146
|
-
* @default undefined
|
|
147
|
-
*/
|
|
148
|
-
weeksToShow?: number;
|
|
149
|
-
/**
|
|
150
|
-
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
|
151
|
-
*/
|
|
152
|
-
minDate?: Date;
|
|
153
|
-
/**
|
|
154
|
-
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
|
155
|
-
*/
|
|
156
|
-
maxDate?: Date;
|
|
157
|
-
/**
|
|
158
|
-
* If set the Calendar will not allow selection of dates in this array.
|
|
159
|
-
*/
|
|
160
|
-
restrictedDates?: Date[];
|
|
161
|
-
/**
|
|
162
|
-
* The days that are selectable when `dateRangeType` is WorkWeek.
|
|
163
|
-
* If `dateRangeType` is not WorkWeek this property does nothing.
|
|
164
|
-
* @default [Monday,Tuesday,Wednesday,Thursday,Friday]
|
|
165
|
-
*/
|
|
166
|
-
workWeekDays?: DayOfWeek[];
|
|
167
|
-
/**
|
|
168
|
-
* Whether the close button should be shown or not
|
|
169
|
-
* @default false
|
|
170
|
-
*/
|
|
171
|
-
showCloseButton?: boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Allows all dates and buttons to be focused, including disabled ones
|
|
174
|
-
* @default false
|
|
175
|
-
*/
|
|
176
|
-
allFocusable?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* The ID of the control that labels this one
|
|
179
|
-
*/
|
|
180
|
-
labelledBy?: string;
|
|
181
|
-
/**
|
|
182
|
-
* Whether to show days outside the selected month with lighter styles
|
|
183
|
-
* @default true
|
|
184
|
-
*/
|
|
185
|
-
lightenDaysOutsideNavigatedMonth?: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
|
188
|
-
*/
|
|
189
|
-
animationDirection?: AnimationDirection;
|
|
190
|
-
/**
|
|
191
|
-
* Optional callback function to mark specific days with a small symbol. Fires when the date range changes,
|
|
192
|
-
* gives the starting and ending displayed dates and expects the list of which days in between should be
|
|
193
|
-
* marked.
|
|
194
|
-
*/
|
|
195
|
-
getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[];
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* @internal
|
|
200
|
-
*/
|
|
201
|
-
declare interface CalendarDayGridStyles {
|
|
202
|
-
/**
|
|
203
|
-
* The style for the root div
|
|
204
|
-
*/
|
|
205
|
-
wrapper?: string;
|
|
206
|
-
/**
|
|
207
|
-
* The style for the table containing the grid
|
|
208
|
-
*/
|
|
209
|
-
table?: string;
|
|
210
|
-
/**
|
|
211
|
-
* The style to apply to the grid cells for days
|
|
212
|
-
*/
|
|
213
|
-
dayCell?: string;
|
|
214
|
-
/**
|
|
215
|
-
* The style to apply to grid cells for days in the selected range
|
|
216
|
-
*/
|
|
217
|
-
daySelected?: string;
|
|
218
|
-
/**
|
|
219
|
-
* The style to apply to row around weeks
|
|
220
|
-
*/
|
|
221
|
-
weekRow?: string;
|
|
222
|
-
/**
|
|
223
|
-
* The style to apply to the column headers above the weeks
|
|
224
|
-
*/
|
|
225
|
-
weekDayLabelCell?: string;
|
|
226
|
-
/**
|
|
227
|
-
* The style to apply to grid cells for week numbers
|
|
228
|
-
*/
|
|
229
|
-
weekNumberCell?: string;
|
|
230
|
-
/**
|
|
231
|
-
* The style to apply to individual days that are outside the min/max date range
|
|
232
|
-
*/
|
|
233
|
-
dayOutsideBounds?: string;
|
|
234
|
-
/**
|
|
235
|
-
* The style to apply to individual days that are outside the current month
|
|
236
|
-
*/
|
|
237
|
-
dayOutsideNavigatedMonth?: string;
|
|
238
|
-
/**
|
|
239
|
-
* The style to apply to the button element within the day cells
|
|
240
|
-
*/
|
|
241
|
-
dayButton?: string;
|
|
242
|
-
/**
|
|
243
|
-
* The style to apply to the individual button element that matches the "today" parameter
|
|
244
|
-
*/
|
|
245
|
-
dayIsToday?: string;
|
|
246
|
-
/**
|
|
247
|
-
* The style applied to the first placeholder week used during transitions
|
|
248
|
-
*/
|
|
249
|
-
firstTransitionWeek?: string;
|
|
250
|
-
/**
|
|
251
|
-
* The style applied to the last placeholder week used during transitions
|
|
252
|
-
*/
|
|
253
|
-
lastTransitionWeek?: string;
|
|
254
|
-
/**
|
|
255
|
-
* The style applied to the marker on days to mark as important
|
|
256
|
-
*/
|
|
257
|
-
dayMarker?: string;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export declare interface CalendarDayProps extends CalendarDayGridProps {
|
|
261
|
-
/**
|
|
262
|
-
* Optional callback to access the ICalendarDay interface. Use this instead of ref for accessing
|
|
263
|
-
* the public methods and properties of the component.
|
|
264
|
-
*/
|
|
265
|
-
componentRef?: React_2.RefObject<ICalendarDay>;
|
|
266
|
-
/**
|
|
267
|
-
* Additional CSS class(es) to apply to the CalendarDay.
|
|
268
|
-
*/
|
|
269
|
-
className?: string;
|
|
270
|
-
/**
|
|
271
|
-
* Localized strings to use in the Calendar
|
|
272
|
-
*/
|
|
273
|
-
strings: CalendarStrings;
|
|
274
|
-
/**
|
|
275
|
-
* The currently navigated date
|
|
276
|
-
*/
|
|
277
|
-
navigatedDate: Date;
|
|
278
|
-
/**
|
|
279
|
-
* Callback issued when a date in the calendar is navigated
|
|
280
|
-
* @param date - The date that is navigated to
|
|
281
|
-
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
|
282
|
-
*/
|
|
283
|
-
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
|
284
|
-
/**
|
|
285
|
-
* Callback issued when calendar day is closed
|
|
286
|
-
*/
|
|
287
|
-
onDismiss?: () => void;
|
|
288
|
-
/**
|
|
289
|
-
* Callback function when the header is selected
|
|
290
|
-
*/
|
|
291
|
-
onHeaderSelect?: () => void;
|
|
292
|
-
/**
|
|
293
|
-
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
|
294
|
-
* @default false
|
|
295
|
-
*/
|
|
296
|
-
showWeekNumbers?: boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Apply additional formatting to dates, for example localized date formatting.
|
|
299
|
-
*/
|
|
300
|
-
dateTimeFormatter: DateFormatting;
|
|
301
|
-
/**
|
|
302
|
-
* Whether the calendar should show 6 weeks by default.
|
|
303
|
-
* @default false
|
|
304
|
-
*/
|
|
305
|
-
showSixWeeksByDefault?: boolean;
|
|
306
|
-
/**
|
|
307
|
-
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
|
308
|
-
*/
|
|
309
|
-
minDate?: Date;
|
|
310
|
-
/**
|
|
311
|
-
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
|
312
|
-
*/
|
|
313
|
-
maxDate?: Date;
|
|
314
|
-
/**
|
|
315
|
-
* If set the Calendar will not allow selection of dates in this array.
|
|
316
|
-
*/
|
|
317
|
-
restrictedDates?: Date[];
|
|
318
|
-
/**
|
|
319
|
-
* Whether the close button should be shown or not
|
|
320
|
-
* @default false
|
|
321
|
-
*/
|
|
322
|
-
showCloseButton?: boolean;
|
|
323
|
-
/**
|
|
324
|
-
* Allows all dates and buttons to be focused, including disabled ones
|
|
325
|
-
* @default false
|
|
326
|
-
*/
|
|
327
|
-
allFocusable?: boolean;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export declare interface CalendarMonthProps {
|
|
331
|
-
/**
|
|
332
|
-
* Optional callback to access the ICalendarMonth interface. Use this instead of ref for accessing
|
|
333
|
-
* the public methods and properties of the component.
|
|
334
|
-
*/
|
|
335
|
-
componentRef?: React_2.RefObject<ICalendarMonth>;
|
|
336
|
-
/**
|
|
337
|
-
* Localized strings to use in the Calendar
|
|
338
|
-
*/
|
|
339
|
-
strings: CalendarStrings;
|
|
340
|
-
/**
|
|
341
|
-
* The currently selected date
|
|
342
|
-
*/
|
|
343
|
-
selectedDate: Date;
|
|
344
|
-
/**
|
|
345
|
-
* The currently navigated date
|
|
346
|
-
*/
|
|
347
|
-
navigatedDate: Date;
|
|
348
|
-
/**
|
|
349
|
-
* Callback issued when a month is selected
|
|
350
|
-
* @param date - The date the user selected
|
|
351
|
-
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
|
352
|
-
* for the component.
|
|
353
|
-
*/
|
|
354
|
-
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
|
355
|
-
/**
|
|
356
|
-
* Callback issued when the year is navigated
|
|
357
|
-
* @param date - The date that is navigated to
|
|
358
|
-
* @param focusOnNavigatedDay - Whether to set the focus to the navigated date.
|
|
359
|
-
*/
|
|
360
|
-
onNavigateDate: (date: Date, focusOnNavigatedDay: boolean) => void;
|
|
361
|
-
/**
|
|
362
|
-
* Value of today. If unspecified, current time in client machine will be used.
|
|
363
|
-
*/
|
|
364
|
-
today?: Date;
|
|
365
|
-
/**
|
|
366
|
-
* Callback function when the header is selected
|
|
367
|
-
*/
|
|
368
|
-
onHeaderSelect?: () => void;
|
|
369
|
-
/**
|
|
370
|
-
* Apply additional formatting to dates, for example localized date formatting.
|
|
371
|
-
*/
|
|
372
|
-
dateTimeFormatter?: DateFormatting;
|
|
373
|
-
/**
|
|
374
|
-
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
|
375
|
-
*/
|
|
376
|
-
minDate?: Date;
|
|
377
|
-
/**
|
|
378
|
-
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
|
379
|
-
*/
|
|
380
|
-
maxDate?: Date;
|
|
381
|
-
/**
|
|
382
|
-
* Whether the month picker should highlight the current month
|
|
383
|
-
* @default false
|
|
384
|
-
*/
|
|
385
|
-
highlightCurrentMonth?: boolean;
|
|
386
|
-
/**
|
|
387
|
-
* Whether the month picker should highlight the selected month
|
|
388
|
-
* @default false
|
|
389
|
-
*/
|
|
390
|
-
highlightSelectedMonth?: boolean;
|
|
391
|
-
/**
|
|
392
|
-
* Allows all dates and buttons to be focused, including disabled ones
|
|
393
|
-
* @default false
|
|
394
|
-
*/
|
|
395
|
-
allFocusable?: boolean;
|
|
396
|
-
/**
|
|
397
|
-
* Additional CSS class(es) to apply to the CalendarMonth.
|
|
398
|
-
*/
|
|
399
|
-
className?: string;
|
|
400
|
-
/**
|
|
401
|
-
* Whether the year picker is hidden
|
|
402
|
-
* @default false
|
|
403
|
-
*/
|
|
404
|
-
yearPickerHidden?: boolean;
|
|
405
|
-
/**
|
|
406
|
-
* The cardinal directions for animation to occur during transitions, either horizontal or veritcal
|
|
407
|
-
*/
|
|
408
|
-
animationDirection?: AnimationDirection;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export declare interface CalendarProps extends React_2.RefAttributes<HTMLDivElement> {
|
|
412
|
-
/**
|
|
413
|
-
* Optional callback to access the ICalendar interface. Use this instead of ref for accessing
|
|
414
|
-
* the public methods and properties of the component.
|
|
415
|
-
*/
|
|
416
|
-
componentRef?: React_2.RefObject<ICalendar>;
|
|
417
|
-
/**
|
|
418
|
-
* Customized props for the calendar day
|
|
419
|
-
*/
|
|
420
|
-
calendarDayProps?: Partial<CalendarDayProps>;
|
|
421
|
-
/**
|
|
422
|
-
* Customized props for the calendar month
|
|
423
|
-
*/
|
|
424
|
-
calendarMonthProps?: Partial<CalendarMonthProps>;
|
|
425
|
-
/**
|
|
426
|
-
* Optional class name to add to the root element.
|
|
427
|
-
*/
|
|
428
|
-
className?: string;
|
|
429
|
-
/**
|
|
430
|
-
* Callback for when a date is selected
|
|
431
|
-
* @param date - The date the user selected
|
|
432
|
-
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set
|
|
433
|
-
* for the component.
|
|
434
|
-
*/
|
|
435
|
-
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
|
|
436
|
-
/**
|
|
437
|
-
* Callback for when calendar is closed
|
|
438
|
-
*/
|
|
439
|
-
onDismiss?: () => void;
|
|
440
|
-
/**
|
|
441
|
-
* ID for the calendar
|
|
442
|
-
*/
|
|
443
|
-
id?: string;
|
|
444
|
-
/**
|
|
445
|
-
* Default value of the Calendar, if any
|
|
446
|
-
*/
|
|
447
|
-
value?: Date;
|
|
448
|
-
/**
|
|
449
|
-
* Value of today. If unspecified, current time in client machine will be used.
|
|
450
|
-
*/
|
|
451
|
-
today?: Date;
|
|
452
|
-
/**
|
|
453
|
-
* The date range type indicating how many days should be selected as the user
|
|
454
|
-
* selects days
|
|
455
|
-
* @default DateRangeType.Day
|
|
456
|
-
*/
|
|
457
|
-
dateRangeType?: DateRangeType;
|
|
458
|
-
/**
|
|
459
|
-
* The first day of the week for your locale.
|
|
460
|
-
* @default DayOfWeek.Sunday
|
|
461
|
-
*/
|
|
462
|
-
firstDayOfWeek?: DayOfWeek;
|
|
463
|
-
/**
|
|
464
|
-
* Defines when the first week of the year should start.
|
|
465
|
-
* @default FirstWeekOfYear.FirstDay
|
|
466
|
-
*/
|
|
467
|
-
firstWeekOfYear?: FirstWeekOfYear;
|
|
468
|
-
/**
|
|
469
|
-
* Whether the month picker is shown beside the day picker or hidden.
|
|
470
|
-
* @default true
|
|
471
|
-
*/
|
|
472
|
-
isMonthPickerVisible?: boolean;
|
|
473
|
-
/**
|
|
474
|
-
* Whether the day picker is shown beside the month picker or hidden.
|
|
475
|
-
* @default true
|
|
476
|
-
*/
|
|
477
|
-
isDayPickerVisible?: boolean;
|
|
478
|
-
/**
|
|
479
|
-
* Show month picker on top of date picker when visible.
|
|
480
|
-
* @default false
|
|
481
|
-
*/
|
|
482
|
-
showMonthPickerAsOverlay?: boolean;
|
|
483
|
-
/**
|
|
484
|
-
* Whether the "Go to today" link should be shown or not
|
|
485
|
-
*/
|
|
486
|
-
showGoToToday?: boolean;
|
|
487
|
-
/**
|
|
488
|
-
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
|
489
|
-
* @default false
|
|
490
|
-
*/
|
|
491
|
-
showWeekNumbers?: boolean;
|
|
492
|
-
/**
|
|
493
|
-
* Localized strings to use in the Calendar
|
|
494
|
-
*/
|
|
495
|
-
strings?: CalendarStrings;
|
|
496
|
-
/**
|
|
497
|
-
* Apply additional formatting to dates, for example localized date formatting.
|
|
498
|
-
*/
|
|
499
|
-
dateTimeFormatter?: DateFormatting;
|
|
500
|
-
/**
|
|
501
|
-
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
|
502
|
-
*/
|
|
503
|
-
minDate?: Date;
|
|
504
|
-
/**
|
|
505
|
-
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
|
506
|
-
*/
|
|
507
|
-
maxDate?: Date;
|
|
508
|
-
/**
|
|
509
|
-
* If set the Calendar will not allow selection of dates in this array.
|
|
510
|
-
*/
|
|
511
|
-
restrictedDates?: Date[];
|
|
512
|
-
/**
|
|
513
|
-
* Whether the calendar should show 6 weeks by default.
|
|
514
|
-
* @default false
|
|
515
|
-
*/
|
|
516
|
-
showSixWeeksByDefault?: boolean;
|
|
517
|
-
/**
|
|
518
|
-
* The days that are selectable when `dateRangeType` is `WorkWeek`.
|
|
519
|
-
* If `dateRangeType` is not `WorkWeek` this property does nothing.
|
|
520
|
-
* @default [Monday,Tuesday,Wednesday,Thursday,Friday]
|
|
521
|
-
*/
|
|
522
|
-
workWeekDays?: DayOfWeek[];
|
|
523
|
-
/**
|
|
524
|
-
* Whether the month picker should highlight the current month
|
|
525
|
-
* @default false
|
|
526
|
-
*/
|
|
527
|
-
highlightCurrentMonth?: boolean;
|
|
528
|
-
/**
|
|
529
|
-
* Whether the month picker should highlight the selected month
|
|
530
|
-
* @default false
|
|
531
|
-
*/
|
|
532
|
-
highlightSelectedMonth?: boolean;
|
|
533
|
-
/**
|
|
534
|
-
* Whether the close button should be shown or not
|
|
535
|
-
* @default false
|
|
536
|
-
*/
|
|
537
|
-
showCloseButton?: boolean;
|
|
538
|
-
/**
|
|
539
|
-
* Allows all dates and buttons to be focused, including disabled ones
|
|
540
|
-
* @default false
|
|
541
|
-
*/
|
|
542
|
-
allFocusable?: boolean;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export declare interface CalendarStrings extends DateGridStrings {
|
|
546
|
-
/**
|
|
547
|
-
* String to render for button to direct the user to today's date.
|
|
548
|
-
*/
|
|
549
|
-
goToToday: string;
|
|
550
|
-
/**
|
|
551
|
-
* Aria-label for the "previous month" button in day picker.
|
|
552
|
-
*/
|
|
553
|
-
prevMonthAriaLabel?: string;
|
|
554
|
-
/**
|
|
555
|
-
* Aria-label for the "next month" button in day picker.
|
|
556
|
-
*/
|
|
557
|
-
nextMonthAriaLabel?: string;
|
|
558
|
-
/**
|
|
559
|
-
* Aria-label for the "previous year" button in month picker.
|
|
560
|
-
*/
|
|
561
|
-
prevYearAriaLabel?: string;
|
|
562
|
-
/**
|
|
563
|
-
* Aria-label for the "next year" button in month picker.
|
|
564
|
-
*/
|
|
565
|
-
nextYearAriaLabel?: string;
|
|
566
|
-
/**
|
|
567
|
-
* Aria-label for the "previous year range" button in year picker.
|
|
568
|
-
*/
|
|
569
|
-
prevYearRangeAriaLabel?: string;
|
|
570
|
-
/**
|
|
571
|
-
* Aria-label for the "next year range" button in year picker.
|
|
572
|
-
*/
|
|
573
|
-
nextYearRangeAriaLabel?: string;
|
|
574
|
-
/**
|
|
575
|
-
* Aria-label format string for the header button in the month picker. Should have 1 string param, e.g. "`{0}`,
|
|
576
|
-
* select to change the year". This aria-label will only be applied if the year picker is enabled; otherwise
|
|
577
|
-
* the label will default to the header string, e.g. "2019".
|
|
578
|
-
*/
|
|
579
|
-
monthPickerHeaderAriaLabel?: string;
|
|
580
|
-
/**
|
|
581
|
-
* Aria-label format string for the header button in the year picker.
|
|
582
|
-
* Should have 1 string param, e.g. "`{0}`, select to change the month"
|
|
583
|
-
*/
|
|
584
|
-
yearPickerHeaderAriaLabel?: string;
|
|
585
|
-
/**
|
|
586
|
-
* Aria-label for the "close" button.
|
|
587
|
-
*/
|
|
588
|
-
closeButtonAriaLabel?: string;
|
|
589
|
-
/**
|
|
590
|
-
* Aria-label format string for the week number header. Should have 1 string param, e.g. "week number `{0}`"
|
|
591
|
-
*/
|
|
592
|
-
weekNumberFormatString?: string;
|
|
593
|
-
/**
|
|
594
|
-
* Aria-label format string for the currently selected date. Should have 1 string param, e.g. "Selected date `{0}`"
|
|
595
|
-
*/
|
|
596
|
-
selectedDateFormatString?: string;
|
|
597
|
-
/**
|
|
598
|
-
* Aria-label format string for today's date. Should have 1 string param, e.g. "Today's date `{0}`"
|
|
599
|
-
*/
|
|
600
|
-
todayDateFormatString?: string;
|
|
601
|
-
/**
|
|
602
|
-
* Aria-label for when a date is marked
|
|
603
|
-
*/
|
|
604
|
-
dayMarkedAriaLabel?: string;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Compare the date parts of two dates
|
|
609
|
-
* @param date1 - The first date to compare
|
|
610
|
-
* @param date2 - The second date to compare
|
|
611
|
-
* @returns A negative value if date1 is earlier than date2, 0 if the dates are equal, or a positive value
|
|
612
|
-
* if date1 is later than date2.
|
|
613
|
-
*/
|
|
614
|
-
export declare function compareDatePart(date1: Date, date2: Date): Number;
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* Compares two dates, and returns true if the two dates (not accounting for time-of-day) are equal.
|
|
618
|
-
* @returns True if the two dates represent the same date (regardless of time-of-day), false otherwise.
|
|
619
|
-
*/
|
|
620
|
-
export declare function compareDates(date1: Date, date2: Date): boolean;
|
|
621
|
-
|
|
622
|
-
export declare interface DateFormatting {
|
|
623
|
-
/**
|
|
624
|
-
* Get a localized string for a day.
|
|
625
|
-
*/
|
|
626
|
-
formatDay: (date: Date) => string;
|
|
627
|
-
/**
|
|
628
|
-
* Get a localized string for a month.
|
|
629
|
-
*/
|
|
630
|
-
formatMonth: (date: Date, strings: DateGridStrings) => string;
|
|
631
|
-
/**
|
|
632
|
-
* Get a localized string for a year.
|
|
633
|
-
*/
|
|
634
|
-
formatYear: (date: Date) => string;
|
|
635
|
-
/**
|
|
636
|
-
* Get a localized string for a month, day, and year.
|
|
637
|
-
*/
|
|
638
|
-
formatMonthDayYear: (date: Date, strings: DateGridStrings) => string;
|
|
639
|
-
/**
|
|
640
|
-
* Get a localized string for a month and year.
|
|
641
|
-
*/
|
|
642
|
-
formatMonthYear: (date: Date, strings: DateGridStrings) => string;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
export declare interface DateGridStrings {
|
|
646
|
-
/**
|
|
647
|
-
* An array of strings for the full names of months.
|
|
648
|
-
* The array is 0-based, so months[0] should be the full name of January.
|
|
649
|
-
*/
|
|
650
|
-
months: string[];
|
|
651
|
-
/**
|
|
652
|
-
* An array of strings for the short names of months.
|
|
653
|
-
* The array is 0-based, so shortMonths[0] should be the short name of January.
|
|
654
|
-
*/
|
|
655
|
-
shortMonths: string[];
|
|
656
|
-
/**
|
|
657
|
-
* An array of strings for the full names of days of the week.
|
|
658
|
-
* The array is 0-based, so days[0] should be the full name of Sunday.
|
|
659
|
-
*/
|
|
660
|
-
days: string[];
|
|
661
|
-
/**
|
|
662
|
-
* An array of strings for the initials of the days of the week.
|
|
663
|
-
* The array is 0-based, so days[0] should be the initial of Sunday.
|
|
664
|
-
*/
|
|
665
|
-
shortDays: string[];
|
|
666
|
-
}
|
|
667
|
-
|
|
668
18
|
export declare const DatePicker: ForwardRefComponent<DatePickerProps>;
|
|
669
19
|
|
|
670
20
|
export declare const datePickerClassNames: SlotClassNames<DatePickerSlots>;
|
|
@@ -865,277 +215,15 @@ export declare type DatePickerValidationResultData = {
|
|
|
865
215
|
error?: DatePickerErrorType;
|
|
866
216
|
};
|
|
867
217
|
|
|
868
|
-
/**
|
|
869
|
-
* The supported date range types
|
|
870
|
-
*/
|
|
871
|
-
export declare enum DateRangeType {
|
|
872
|
-
Day = 0,
|
|
873
|
-
Week = 1,
|
|
874
|
-
Month = 2,
|
|
875
|
-
WorkWeek = 3
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
declare interface DayGridOptions extends RestrictedDatesOptions {
|
|
879
|
-
/**
|
|
880
|
-
* The first day of the week for your locale.
|
|
881
|
-
*/
|
|
882
|
-
firstDayOfWeek: DayOfWeek;
|
|
883
|
-
/**
|
|
884
|
-
* Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
|
|
885
|
-
* FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
|
|
886
|
-
*/
|
|
887
|
-
firstWeekOfYear: FirstWeekOfYear;
|
|
888
|
-
/**
|
|
889
|
-
* The date range type indicating how many days should be selected as the user
|
|
890
|
-
* selects days
|
|
891
|
-
*/
|
|
892
|
-
dateRangeType: DateRangeType;
|
|
893
|
-
/**
|
|
894
|
-
* The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day
|
|
895
|
-
* views.
|
|
896
|
-
*/
|
|
897
|
-
daysToSelectInDayView?: number;
|
|
898
|
-
/**
|
|
899
|
-
* Value of today. If unspecified, current time in client machine will be used.
|
|
900
|
-
*/
|
|
901
|
-
today?: Date;
|
|
902
|
-
/**
|
|
903
|
-
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
|
|
904
|
-
*/
|
|
905
|
-
showWeekNumbers?: boolean;
|
|
906
|
-
/**
|
|
907
|
-
* The days that are selectable when `dateRangeType` is WorkWeek.
|
|
908
|
-
* If `dateRangeType` is not WorkWeek this property does nothing.
|
|
909
|
-
*/
|
|
910
|
-
workWeekDays?: DayOfWeek[];
|
|
911
|
-
/**
|
|
912
|
-
* Which days in the generated grid should be marked.
|
|
913
|
-
*/
|
|
914
|
-
markedDays?: Date[];
|
|
915
|
-
/**
|
|
916
|
-
* The currently selected date
|
|
917
|
-
*/
|
|
918
|
-
selectedDate: Date;
|
|
919
|
-
/**
|
|
920
|
-
* The currently navigated date
|
|
921
|
-
*/
|
|
922
|
-
navigatedDate: Date;
|
|
923
|
-
/**
|
|
924
|
-
* How many weeks to show by default. If not provided, will show enough weeks to display the current
|
|
925
|
-
* month, between 4 and 6 depending
|
|
926
|
-
*/
|
|
927
|
-
weeksToShow?: number;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* The days of the week
|
|
932
|
-
*/
|
|
933
|
-
export declare enum DayOfWeek {
|
|
934
|
-
Sunday = 0,
|
|
935
|
-
Monday = 1,
|
|
936
|
-
Tuesday = 2,
|
|
937
|
-
Wednesday = 3,
|
|
938
|
-
Thursday = 4,
|
|
939
|
-
Friday = 5,
|
|
940
|
-
Saturday = 6
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
export declare const DAYS_IN_WEEK = 7;
|
|
944
|
-
|
|
945
218
|
export declare const defaultDatePickerErrorStrings: Record<DatePickerErrorType, string>;
|
|
946
219
|
|
|
947
220
|
export declare const defaultDatePickerStrings: CalendarStrings;
|
|
948
221
|
|
|
949
|
-
/**
|
|
950
|
-
* First week of the year settings types
|
|
951
|
-
*/
|
|
952
|
-
export declare enum FirstWeekOfYear {
|
|
953
|
-
FirstDay = 0,
|
|
954
|
-
FirstFullWeek = 1,
|
|
955
|
-
FirstFourDayWeek = 2
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* Helper function to assist in date comparisons
|
|
960
|
-
*/
|
|
961
|
-
export declare function getDatePartHashValue(date: Date): number;
|
|
962
|
-
|
|
963
|
-
/**
|
|
964
|
-
* Gets the date range array including the specified date. The date range array is calculated as the list
|
|
965
|
-
* of dates accounting for the specified first day of the week and date range type.
|
|
966
|
-
* @param date - The input date
|
|
967
|
-
* @param dateRangeType - The desired date range type, i.e., day, week, month, etc.
|
|
968
|
-
* @param firstDayOfWeek - The first day of the week.
|
|
969
|
-
* @param workWeekDays - The allowed days in work week. If not provided, assumes all days are allowed.
|
|
970
|
-
* @param daysToSelectInDayView - The number of days to include when using dateRangeType === DateRangeType.Day
|
|
971
|
-
* for multiday view. Defaults to 1
|
|
972
|
-
* @returns An array of dates representing the date range containing the specified date.
|
|
973
|
-
*/
|
|
974
|
-
export declare function getDateRangeArray(date: Date, dateRangeType: DateRangeType, firstDayOfWeek: DayOfWeek, workWeekDays?: DayOfWeek[], daysToSelectInDayView?: number): Date[];
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* Gets the date for the last day of the week based on the given date assuming
|
|
978
|
-
* the specified first day of the week.
|
|
979
|
-
* @param date - The date to find the beginning of the week date for.
|
|
980
|
-
* @returns A new date object representing the first day of the week containing the input date.
|
|
981
|
-
*/
|
|
982
|
-
export declare function getEndDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* Returns a date that is the last day of the month of the provided date.
|
|
986
|
-
* @param date - The origin date
|
|
987
|
-
* @returns A new Date object with the day set to the last day of the month.
|
|
988
|
-
*/
|
|
989
|
-
export declare function getMonthEnd(date: Date): Date;
|
|
990
|
-
|
|
991
|
-
/**
|
|
992
|
-
* Returns a date that is the first day of the month of the provided date.
|
|
993
|
-
* @param date - The origin date
|
|
994
|
-
* @returns A new Date object with the day set to the first day of the month.
|
|
995
|
-
*/
|
|
996
|
-
export declare function getMonthStart(date: Date): Date;
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Gets the date for the first day of the week based on the given date assuming
|
|
1000
|
-
* the specified first day of the week.
|
|
1001
|
-
* @param date - The date to find the beginning of the week date for.
|
|
1002
|
-
* @returns A new date object representing the first day of the week containing the input date.
|
|
1003
|
-
*/
|
|
1004
|
-
export declare function getStartDateOfWeek(date: Date, firstDayOfWeek: DayOfWeek): Date;
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* Returns the week number for a date.
|
|
1008
|
-
* Week numbers are 1 - 52 (53) in a year
|
|
1009
|
-
* @param date - A date to find the week number for.
|
|
1010
|
-
* @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
|
|
1011
|
-
* @param firstWeekOfYear - The first week of the year (1-2)
|
|
1012
|
-
* @returns The week's number in the year.
|
|
1013
|
-
*/
|
|
1014
|
-
export declare function getWeekNumber(date: Date, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear): number;
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* Returns the week number for a date.
|
|
1018
|
-
* Week numbers are 1 - 52 (53) in a year
|
|
1019
|
-
* @param navigatedDate - A date to find the week number for.
|
|
1020
|
-
* @param firstDayOfWeek - The first day of the week (0-6, Sunday = 0)
|
|
1021
|
-
* @param firstWeekOfYear - The first week of the year (1-2)
|
|
1022
|
-
* @returns The weeks number array for the current month.
|
|
1023
|
-
*/
|
|
1024
|
-
export declare function getWeekNumbersInMonth(weeksInMonth: number, firstDayOfWeek: DayOfWeek, firstWeekOfYear: FirstWeekOfYear, navigatedDate: Date): number[];
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* Returns a date that is the last day of the year of the provided date.
|
|
1028
|
-
* @param date - The origin date
|
|
1029
|
-
* @returns A new Date object with the day set to the last day of the year.
|
|
1030
|
-
*/
|
|
1031
|
-
export declare function getYearEnd(date: Date): Date;
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* Returns a date that is the first day of the year of the provided date.
|
|
1035
|
-
* @param date - The origin date
|
|
1036
|
-
* @returns A new Date object with the day set to the first day of the year.
|
|
1037
|
-
*/
|
|
1038
|
-
export declare function getYearStart(date: Date): Date;
|
|
1039
|
-
|
|
1040
|
-
export declare interface ICalendar {
|
|
1041
|
-
/** Sets focus to the selected date. */
|
|
1042
|
-
focus: () => void;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
export declare interface ICalendarDay {
|
|
1046
|
-
focus(): void;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* @internal
|
|
1051
|
-
*/
|
|
1052
|
-
declare interface ICalendarDayGrid {
|
|
1053
|
-
focus(): void;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
export declare interface ICalendarMonth {
|
|
1057
|
-
focus(): void;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
* Checks whether the specified date is in the given date range.
|
|
1062
|
-
* @param date - The origin date
|
|
1063
|
-
* @param dateRange - An array of dates to do the lookup on
|
|
1064
|
-
* @returns True if the date matches one of the dates in the specified array, false otherwise.
|
|
1065
|
-
*/
|
|
1066
|
-
export declare function isInDateRangeArray(date: Date, dateRange: Date[]): boolean;
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* The months
|
|
1070
|
-
*/
|
|
1071
|
-
export declare enum MonthOfYear {
|
|
1072
|
-
January = 0,
|
|
1073
|
-
February = 1,
|
|
1074
|
-
March = 2,
|
|
1075
|
-
April = 3,
|
|
1076
|
-
May = 4,
|
|
1077
|
-
June = 5,
|
|
1078
|
-
July = 6,
|
|
1079
|
-
August = 7,
|
|
1080
|
-
September = 8,
|
|
1081
|
-
October = 9,
|
|
1082
|
-
November = 10,
|
|
1083
|
-
December = 11
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
222
|
/**
|
|
1087
223
|
* Render the final JSX of DatePicker
|
|
1088
224
|
*/
|
|
1089
225
|
export declare const renderDatePicker_unstable: (state: DatePickerState) => JSX.Element;
|
|
1090
226
|
|
|
1091
|
-
declare interface RestrictedDatesOptions {
|
|
1092
|
-
/**
|
|
1093
|
-
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
|
|
1094
|
-
*/
|
|
1095
|
-
minDate?: Date;
|
|
1096
|
-
/**
|
|
1097
|
-
* If set the Calendar will not allow navigation to or selection of a date later than this value.
|
|
1098
|
-
*/
|
|
1099
|
-
maxDate?: Date;
|
|
1100
|
-
/**
|
|
1101
|
-
* If set the Calendar will not allow selection of dates in this array.
|
|
1102
|
-
*/
|
|
1103
|
-
restrictedDates?: Date[];
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
/**
|
|
1107
|
-
* Returns a date that is a copy of the given date, aside from the month changing to the given month.
|
|
1108
|
-
* The method tries to preserve the day-of-month; however, if the new month does not have enough days
|
|
1109
|
-
* to contain the original day-of-month, we'll use the last day of the new month.
|
|
1110
|
-
* @param date - The origin date
|
|
1111
|
-
* @param month - The 0-based index of the month to set on the date.
|
|
1112
|
-
* @returns A new Date object with the given month set.
|
|
1113
|
-
*/
|
|
1114
|
-
export declare function setMonth(date: Date, month: number): Date;
|
|
1115
|
-
|
|
1116
|
-
export declare const TimeConstants: {
|
|
1117
|
-
MillisecondsInOneDay: number;
|
|
1118
|
-
MillisecondsIn1Sec: number;
|
|
1119
|
-
MillisecondsIn1Min: number;
|
|
1120
|
-
MillisecondsIn30Mins: number;
|
|
1121
|
-
MillisecondsIn1Hour: number;
|
|
1122
|
-
MinutesInOneDay: number;
|
|
1123
|
-
MinutesInOneHour: number;
|
|
1124
|
-
DaysInOneWeek: number;
|
|
1125
|
-
MonthInOneYear: number;
|
|
1126
|
-
HoursInOneDay: number;
|
|
1127
|
-
SecondsInOneMinute: number;
|
|
1128
|
-
OffsetTo24HourFormat: number;
|
|
1129
|
-
/**
|
|
1130
|
-
* Matches a time string. Groups:
|
|
1131
|
-
* 1. hours (with or without leading 0)
|
|
1132
|
-
* 2. minutes
|
|
1133
|
-
* 3. seconds (optional)
|
|
1134
|
-
* 4. meridiem (am/pm, case-insensitive, optional)
|
|
1135
|
-
*/
|
|
1136
|
-
TimeFormatRegex: RegExp;
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
227
|
/**
|
|
1140
228
|
* Create the state required to render DatePicker.
|
|
1141
229
|
*
|