@progress/kendo-react-dateinputs 7.2.4-develop.3 → 7.3.0-develop.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/calendar/components/Calendar.js +12 -0
- package/calendar/components/Calendar.mjs +328 -0
- package/calendar/components/CalendarCell.js +8 -0
- package/calendar/components/CalendarCell.mjs +101 -0
- package/calendar/components/CalendarHeaderTitle.js +8 -0
- package/calendar/components/CalendarHeaderTitle.mjs +23 -0
- package/calendar/components/CalendarNavigationItem.js +8 -0
- package/calendar/components/CalendarNavigationItem.mjs +29 -0
- package/calendar/components/CalendarWeekCell.js +8 -0
- package/calendar/components/CalendarWeekCell.mjs +23 -0
- package/calendar/components/Header.js +8 -0
- package/calendar/components/Header.mjs +78 -0
- package/calendar/components/HorizontalViewList.js +8 -0
- package/calendar/components/HorizontalViewList.mjs +120 -0
- package/calendar/components/MultiViewCalendar.js +8 -0
- package/calendar/components/MultiViewCalendar.mjs +428 -0
- package/calendar/components/Navigation.js +8 -0
- package/calendar/components/Navigation.mjs +117 -0
- package/calendar/components/TodayCommand.js +8 -0
- package/calendar/components/TodayCommand.mjs +74 -0
- package/calendar/components/View.js +8 -0
- package/calendar/components/View.mjs +153 -0
- package/calendar/components/ViewList.js +8 -0
- package/calendar/components/ViewList.mjs +228 -0
- package/calendar/models/CalendarViewEnum.js +8 -0
- package/calendar/models/CalendarViewEnum.mjs +12 -0
- package/calendar/models/NavigationAction.js +8 -0
- package/calendar/models/NavigationAction.mjs +12 -0
- package/calendar/models/SelectionRange.js +8 -0
- package/calendar/models/SelectionRange.mjs +12 -0
- package/calendar/services/BusViewService.js +8 -0
- package/calendar/services/BusViewService.mjs +58 -0
- package/calendar/services/CenturyViewService.js +8 -0
- package/calendar/services/CenturyViewService.mjs +126 -0
- package/calendar/services/DOMService.js +14 -0
- package/calendar/services/DOMService.mjs +124 -0
- package/calendar/services/DecadeViewService.js +8 -0
- package/calendar/services/DecadeViewService.mjs +126 -0
- package/calendar/services/MonthViewService.js +8 -0
- package/calendar/services/MonthViewService.mjs +139 -0
- package/calendar/services/NavigationService.js +8 -0
- package/calendar/services/NavigationService.mjs +36 -0
- package/calendar/services/ScrollSyncService.js +8 -0
- package/calendar/services/ScrollSyncService.mjs +50 -0
- package/calendar/services/WeekNamesService.js +8 -0
- package/calendar/services/WeekNamesService.mjs +24 -0
- package/calendar/services/YearViewService.js +8 -0
- package/calendar/services/YearViewService.mjs +135 -0
- package/common/AdaptiveMode.js +8 -0
- package/common/AdaptiveMode.mjs +73 -0
- package/common/PickerWrap.js +8 -0
- package/common/PickerWrap.mjs +32 -0
- package/common/constants.js +8 -0
- package/common/constants.mjs +12 -0
- package/dateinput/DateInput.js +8 -0
- package/dateinput/DateInput.mjs +503 -0
- package/dateinput/models/kendo-date.js +8 -0
- package/dateinput/models/kendo-date.mjs +233 -0
- package/dateinput/models/mask.js +8 -0
- package/dateinput/models/mask.mjs +16 -0
- package/dateinput/utils.js +8 -0
- package/dateinput/utils.mjs +38 -0
- package/datepicker/DatePicker.js +8 -0
- package/datepicker/DatePicker.mjs +462 -0
- package/datepicker/ToggleButton.js +8 -0
- package/datepicker/ToggleButton.mjs +13 -0
- package/daterangepicker/DateRangePicker.js +8 -0
- package/daterangepicker/DateRangePicker.mjs +426 -0
- package/datetimepicker/DateTimePicker.js +8 -0
- package/datetimepicker/DateTimePicker.mjs +475 -0
- package/datetimepicker/DateTimeSelector.js +8 -0
- package/datetimepicker/DateTimeSelector.mjs +275 -0
- package/dist/cdn/js/kendo-react-dateinputs.js +8 -21
- package/hooks/usePickerFloatingLabel.js +8 -0
- package/hooks/usePickerFloatingLabel.mjs +31 -0
- package/index.d.mts +4528 -5
- package/index.d.ts +4528 -39
- package/index.js +8 -21
- package/index.mjs +114 -6540
- package/messages/index.js +8 -0
- package/messages/index.mjs +59 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +7 -7
- package/timepicker/TimeList.js +14 -0
- package/timepicker/TimeList.mjs +230 -0
- package/timepicker/TimePart.js +8 -0
- package/timepicker/TimePart.mjs +267 -0
- package/timepicker/TimePicker.js +8 -0
- package/timepicker/TimePicker.mjs +479 -0
- package/timepicker/TimeSelector.js +8 -0
- package/timepicker/TimeSelector.mjs +250 -0
- package/timepicker/models/TimePart.js +8 -0
- package/timepicker/models/TimePart.mjs +18 -0
- package/timepicker/services/DOMService.js +8 -0
- package/timepicker/services/DOMService.mjs +34 -0
- package/timepicker/services/DayPeriodService.js +8 -0
- package/timepicker/services/DayPeriodService.mjs +89 -0
- package/timepicker/services/HoursService.js +8 -0
- package/timepicker/services/HoursService.mjs +92 -0
- package/timepicker/services/MinutesService.js +8 -0
- package/timepicker/services/MinutesService.mjs +91 -0
- package/timepicker/services/SecondsService.js +8 -0
- package/timepicker/services/SecondsService.mjs +91 -0
- package/timepicker/utils.js +8 -0
- package/timepicker/utils.mjs +91 -0
- package/utils.js +8 -0
- package/utils.mjs +111 -0
- package/virtualization/Virtualization.js +8 -0
- package/virtualization/Virtualization.mjs +204 -0
- package/virtualization/services/RowHeightService.js +8 -0
- package/virtualization/services/RowHeightService.mjs +50 -0
- package/virtualization/services/ScrollerService.js +8 -0
- package/virtualization/services/ScrollerService.mjs +52 -0
- package/PopupSettings.d.ts +0 -18
- package/calendar/components/Calendar.d.ts +0 -191
- package/calendar/components/CalendarCell.d.ts +0 -39
- package/calendar/components/CalendarHeaderTitle.d.ts +0 -32
- package/calendar/components/CalendarNavigationItem.d.ts +0 -31
- package/calendar/components/CalendarWeekCell.d.ts +0 -29
- package/calendar/components/Header.d.ts +0 -58
- package/calendar/components/HorizontalViewList.d.ts +0 -71
- package/calendar/components/MultiViewCalendar.d.ts +0 -212
- package/calendar/components/Navigation.d.ts +0 -80
- package/calendar/components/TodayCommand.d.ts +0 -35
- package/calendar/components/View.d.ts +0 -89
- package/calendar/components/ViewList.d.ts +0 -115
- package/calendar/models/ActiveView.d.ts +0 -8
- package/calendar/models/CalendarSettings.d.ts +0 -106
- package/calendar/models/CalendarViewEnum.d.ts +0 -13
- package/calendar/models/CellContext.d.ts +0 -23
- package/calendar/models/MultiViewCalendarMode.d.ts +0 -13
- package/calendar/models/MultiViewCalendarSettings.d.ts +0 -115
- package/calendar/models/NavigationAction.d.ts +0 -19
- package/calendar/models/SelectionRange.d.ts +0 -21
- package/calendar/models/SelectionRangeEnd.d.ts +0 -8
- package/calendar/models/ViewService.d.ts +0 -29
- package/calendar/models/index.d.ts +0 -15
- package/calendar/services/BusViewService.d.ts +0 -25
- package/calendar/services/CenturyViewService.d.ts +0 -29
- package/calendar/services/DOMService.d.ts +0 -33
- package/calendar/services/DecadeViewService.d.ts +0 -31
- package/calendar/services/MonthViewService.d.ts +0 -37
- package/calendar/services/NavigationService.d.ts +0 -18
- package/calendar/services/ScrollSyncService.d.ts +0 -25
- package/calendar/services/WeekNamesService.d.ts +0 -13
- package/calendar/services/YearViewService.d.ts +0 -35
- package/calendar/services/index.d.ts +0 -14
- package/common/AdaptiveMode.d.ts +0 -25
- package/common/PickerWrap.d.ts +0 -22
- package/common/constants.d.ts +0 -8
- package/dateinput/DateInput.d.ts +0 -355
- package/dateinput/models/DateInputSettings.d.ts +0 -103
- package/dateinput/models/format-placeholder.d.ts +0 -43
- package/dateinput/models/incremental-steps.d.ts +0 -15
- package/dateinput/models/index.d.ts +0 -11
- package/dateinput/models/kendo-date.d.ts +0 -57
- package/dateinput/models/mask.d.ts +0 -11
- package/dateinput/models/selection.d.ts +0 -11
- package/dateinput/utils.d.ts +0 -34
- package/datepicker/DatePicker.d.ts +0 -358
- package/datepicker/ToggleButton.d.ts +0 -14
- package/datepicker/models/DatePickerSettings.d.ts +0 -141
- package/datepicker/models/index.d.ts +0 -6
- package/daterangepicker/DateRangePicker.d.ts +0 -354
- package/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +0 -10
- package/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +0 -10
- package/daterangepicker/models/DateRangePickerPopupSettings.d.ts +0 -10
- package/daterangepicker/models/DateRangePickerSettings.d.ts +0 -126
- package/daterangepicker/models/index.d.ts +0 -9
- package/datetimepicker/DateTimePicker.d.ts +0 -342
- package/datetimepicker/DateTimeSelector.d.ts +0 -106
- package/datetimepicker/models/DateTimePickerSettings.d.ts +0 -144
- package/datetimepicker/models/index.d.ts +0 -6
- package/hooks/usePickerFloatingLabel.d.ts +0 -24
- package/messages/index.d.ts +0 -124
- package/package-metadata.d.ts +0 -9
- package/timepicker/TimeList.d.ts +0 -91
- package/timepicker/TimePart.d.ts +0 -141
- package/timepicker/TimePicker.d.ts +0 -355
- package/timepicker/TimeSelector.d.ts +0 -144
- package/timepicker/models/IncrementalSteps.d.ts +0 -12
- package/timepicker/models/ListItem.d.ts +0 -11
- package/timepicker/models/ListService.d.ts +0 -19
- package/timepicker/models/ListServiceSettings.d.ts +0 -16
- package/timepicker/models/TimePart.d.ts +0 -14
- package/timepicker/models/TimePickerSettings.d.ts +0 -133
- package/timepicker/models/index.d.ts +0 -11
- package/timepicker/services/DOMService.d.ts +0 -14
- package/timepicker/services/DayPeriodService.d.ts +0 -51
- package/timepicker/services/HoursService.d.ts +0 -37
- package/timepicker/services/MinutesService.d.ts +0 -36
- package/timepicker/services/SecondsService.d.ts +0 -36
- package/timepicker/services/index.d.ts +0 -10
- package/timepicker/utils.d.ts +0 -60
- package/utils.d.ts +0 -100
- package/virtualization/Virtualization.d.ts +0 -120
- package/virtualization/services/RowHeightService.d.ts +0 -22
- package/virtualization/services/ScrollerService.d.ts +0 -53
- package/virtualization/services/index.d.ts +0 -7
package/index.d.ts
CHANGED
|
@@ -1,39 +1,4528 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Button } from '@progress/kendo-react-buttons';
|
|
9
|
+
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
|
+
import { DateFormatOptions } from '@progress/kendo-react-intl';
|
|
11
|
+
import { DateFormatPart } from '@progress/kendo-react-intl';
|
|
12
|
+
import { FormComponent } from '@progress/kendo-react-common';
|
|
13
|
+
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
14
|
+
import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
15
|
+
import { IntlService } from '@progress/kendo-react-intl';
|
|
16
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
17
|
+
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
18
|
+
import { PopupProps } from '@progress/kendo-react-popup';
|
|
19
|
+
import PropTypes from 'prop-types';
|
|
20
|
+
import * as React_2 from 'react';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export declare enum Action {
|
|
26
|
+
Left = 0,
|
|
27
|
+
Right = 1,
|
|
28
|
+
Up = 2,
|
|
29
|
+
Down = 3,
|
|
30
|
+
PrevView = 4,
|
|
31
|
+
NextView = 5,
|
|
32
|
+
FirstInView = 6,
|
|
33
|
+
LastInView = 7,
|
|
34
|
+
LowerView = 8,
|
|
35
|
+
UpperView = 9
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The literal type that defines all possible Calendar views.
|
|
40
|
+
*/
|
|
41
|
+
export declare type ActiveView = 'month' | 'year' | 'decade' | 'century';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
export declare class BusViewService {
|
|
47
|
+
private onViewChanged;
|
|
48
|
+
private bottom;
|
|
49
|
+
private top;
|
|
50
|
+
constructor(onViewChanged: any);
|
|
51
|
+
configure(bottom: CalendarViewEnum, top: CalendarViewEnum): void;
|
|
52
|
+
service(view: CalendarViewEnum, intl: IntlService): ViewService;
|
|
53
|
+
moveDown(view: CalendarViewEnum, event?: React.SyntheticEvent<any>): void;
|
|
54
|
+
moveUp(view: CalendarViewEnum, event?: React.SyntheticEvent<any>): void;
|
|
55
|
+
moveToBottom(activeView: CalendarViewEnum): void;
|
|
56
|
+
canMoveDown(view: CalendarViewEnum): boolean;
|
|
57
|
+
canMoveUp(view: CalendarViewEnum): boolean;
|
|
58
|
+
private clamp;
|
|
59
|
+
private move;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @hidden */
|
|
63
|
+
export declare type Calendar = CalendarHandle;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Represents the KendoReact Calendar Component.
|
|
67
|
+
*
|
|
68
|
+
* Accepts properties of type [CalendarProps]({% slug api_dateinputs_calendarprops %}).
|
|
69
|
+
* Obtaining the `ref` returns an object of type [CalendarHandle]({% slug api_dateinputs_calendarhandle %}).
|
|
70
|
+
*/
|
|
71
|
+
export declare const Calendar: React_2.ForwardRefExoticComponent<CalendarProps<any> & React_2.RefAttributes<any>>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The `CalendarCell` component is internally used for rendering the items in the current view. Also be used as a custom `cell` of the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-cell) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-cell).
|
|
75
|
+
*
|
|
76
|
+
* * [Customizing the cells inside the Calendar view]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)
|
|
77
|
+
* * [Customizing the cells inside the MultiViewCalendar view]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-view)
|
|
78
|
+
*/
|
|
79
|
+
export declare class CalendarCell extends React_2.Component<CalendarCellProps> {
|
|
80
|
+
/**
|
|
81
|
+
* @hidden
|
|
82
|
+
*/
|
|
83
|
+
shouldComponentUpdate(nextProps: CalendarCellProps): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* @return
|
|
86
|
+
* Returns a `<td />` element with a `<span className="k-link" />` inside to apply the styles. The text inside is the [`formattedValue`]({% slug api_dateinputs_calendarcellprops %}#toc-formattedvalue) of the `cell`.
|
|
87
|
+
*/
|
|
88
|
+
render(): JSX_2.Element;
|
|
89
|
+
private handleClick;
|
|
90
|
+
private handleMouseEnter;
|
|
91
|
+
private handleMouseLeave;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The props which will be received by the custom cell of the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-cell) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-cell).
|
|
96
|
+
*/
|
|
97
|
+
export declare interface CalendarCellProps extends CellContext {
|
|
98
|
+
className?: string;
|
|
99
|
+
style?: React_2.CSSProperties;
|
|
100
|
+
isDisabled?: boolean;
|
|
101
|
+
view?: CalendarViewEnum;
|
|
102
|
+
onClick?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
103
|
+
onMouseEnter?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
104
|
+
onMouseLeave?: (value: Date, event?: React_2.MouseEvent<any>) => void;
|
|
105
|
+
[aria: string]: any;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The arguments for the `change` event of the Calendar. The generic argument sets the target type of the event. Defaults to `Calendar`.
|
|
110
|
+
*/
|
|
111
|
+
export declare interface CalendarChangeEvent<T = Calendar> {
|
|
112
|
+
/**
|
|
113
|
+
* A native DOM event.
|
|
114
|
+
*/
|
|
115
|
+
nativeEvent?: any;
|
|
116
|
+
/**
|
|
117
|
+
* A React Synthetic Event.
|
|
118
|
+
*/
|
|
119
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
120
|
+
/**
|
|
121
|
+
* The new value.
|
|
122
|
+
*/
|
|
123
|
+
value: Date;
|
|
124
|
+
/**
|
|
125
|
+
* The Calendar element.
|
|
126
|
+
*/
|
|
127
|
+
target: T;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Represent the `ref` of the Calendar component.
|
|
132
|
+
*/
|
|
133
|
+
export declare interface CalendarHandle extends Pick<CalendarWithoutContext, keyof CalendarWithoutContext> {
|
|
134
|
+
/**
|
|
135
|
+
* Returns the HTML element of the Calendar component.
|
|
136
|
+
*/
|
|
137
|
+
element: HTMLDivElement | null;
|
|
138
|
+
/**
|
|
139
|
+
* Returns the `value` of the Calendar component.
|
|
140
|
+
*/
|
|
141
|
+
value: Date | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The `CalendarHeaderTitle` component is internally used for rendering the title of the current calendar view. Also used as a custom `headerTitle` for the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-headertitle) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-headertitle) components.
|
|
146
|
+
*
|
|
147
|
+
* * [Customizing the title for the current Calendar view]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)
|
|
148
|
+
* * [Customizing the title for the current MultiViewCalendar view]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-view)
|
|
149
|
+
*/
|
|
150
|
+
export declare class CalendarHeaderTitle extends React_2.PureComponent<CalendarHeaderTitleProps, {}> {
|
|
151
|
+
/**
|
|
152
|
+
* @return
|
|
153
|
+
* Returns a `<span />` element with the [`value`]({% slug api_dateinputs_calendarheadertitleprops %}#toc-value) of the title as a child.
|
|
154
|
+
*/
|
|
155
|
+
render(): JSX_2.Element;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The props which will be received by the custom header title of the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-headertitle) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-headertitle).
|
|
160
|
+
*/
|
|
161
|
+
export declare interface CalendarHeaderTitleProps {
|
|
162
|
+
className?: string;
|
|
163
|
+
children?: React_2.ReactNode;
|
|
164
|
+
value?: string;
|
|
165
|
+
id?: string;
|
|
166
|
+
view?: CalendarViewEnum;
|
|
167
|
+
style?: React_2.CSSProperties;
|
|
168
|
+
onClick?: (event?: React_2.SyntheticEvent<any>) => void;
|
|
169
|
+
disabled?: boolean;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The `CalendarNavigationItem` component is internally used for rendering the items in the side navigation of the Calendar. Also used as a custom navigation item for the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-navigationitem) ([see example]({% slug custom_rendering_calendar %}#toc-items-in-the-side-navigation)).
|
|
174
|
+
*/
|
|
175
|
+
export declare class CalendarNavigationItem extends React_2.Component<CalendarNavigationItemProps> {
|
|
176
|
+
/**
|
|
177
|
+
* @return
|
|
178
|
+
* Returns a `<li />` element with a `<span />` inside. The text inside represents the [`value`]({% slug api_dateinputs_calendarnavigationitemprops %}#toc-value) of the `navigationItem`.
|
|
179
|
+
*/
|
|
180
|
+
render(): JSX_2.Element;
|
|
181
|
+
private handleClick;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The props which will be received by the custom navigation item of the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-navigationitem).
|
|
186
|
+
*/
|
|
187
|
+
export declare interface CalendarNavigationItemProps {
|
|
188
|
+
text?: string;
|
|
189
|
+
value: Date;
|
|
190
|
+
id?: string;
|
|
191
|
+
style?: React_2.CSSProperties;
|
|
192
|
+
view?: CalendarViewEnum;
|
|
193
|
+
onClick?: (value: Date, event?: React_2.SyntheticEvent<any>) => void;
|
|
194
|
+
children?: React_2.ReactNode;
|
|
195
|
+
className?: string;
|
|
196
|
+
isRangeStart?: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Represents the props of the [KendoReact Calendar component]({% slug overview_calendar %}). The generic argument is passed to the `onChange` property and is used as a target in the [`CalendarChangeEvent`]({% slug api_dateinputs_calendarchangeevent %}) interface.
|
|
201
|
+
*/
|
|
202
|
+
export declare interface CalendarProps<T = any> extends CalendarSettings {
|
|
203
|
+
/** @hidden */
|
|
204
|
+
_ref?: (instance: {
|
|
205
|
+
element: HTMLDivElement | null;
|
|
206
|
+
}) => void;
|
|
207
|
+
/**
|
|
208
|
+
* Sets the default value of the Calendar.
|
|
209
|
+
*/
|
|
210
|
+
defaultValue?: Date | null;
|
|
211
|
+
/**
|
|
212
|
+
* An event that is called after the value of the Calendar has changed.
|
|
213
|
+
*/
|
|
214
|
+
onChange?: (event: CalendarChangeEvent<T>) => void;
|
|
215
|
+
/**
|
|
216
|
+
* Sets the value of the Calendar.
|
|
217
|
+
*/
|
|
218
|
+
value?: Date | null;
|
|
219
|
+
/**
|
|
220
|
+
* @hidden
|
|
221
|
+
*/
|
|
222
|
+
mobileMode?: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Represents the PropsContext of the `Calendar` component.
|
|
227
|
+
* Used for global configuration of all `Calendar` instances.
|
|
228
|
+
*
|
|
229
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
230
|
+
*/
|
|
231
|
+
export declare const CalendarPropsContext: React_2.Context<(p: CalendarProps<any>) => CalendarProps<any>>;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @hidden
|
|
235
|
+
*/
|
|
236
|
+
export declare interface CalendarSettings {
|
|
237
|
+
/**
|
|
238
|
+
* Defines the bottommost view to which the user can navigate.
|
|
239
|
+
*/
|
|
240
|
+
bottomView?: ActiveView;
|
|
241
|
+
/**
|
|
242
|
+
* Sets the `className` of the Calendar.
|
|
243
|
+
*/
|
|
244
|
+
className?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Sets the default active view of the Calendar.
|
|
247
|
+
* If not set, the Calendar will display the month view.
|
|
248
|
+
*/
|
|
249
|
+
defaultActiveView?: ActiveView;
|
|
250
|
+
/**
|
|
251
|
+
* Determines whether the Calendar is disabled.
|
|
252
|
+
*/
|
|
253
|
+
disabled?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Sets the initial focused date of the Calendar.
|
|
256
|
+
*/
|
|
257
|
+
focusedDate?: Date;
|
|
258
|
+
/**
|
|
259
|
+
* Sets the `id` of the Calendar.
|
|
260
|
+
*/
|
|
261
|
+
id?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
264
|
+
* For example these elements could contain error or hint message.
|
|
265
|
+
*/
|
|
266
|
+
ariaDescribedBy?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Identifies the element(s) which will label the component.
|
|
269
|
+
*/
|
|
270
|
+
ariaLabelledBy?: string;
|
|
271
|
+
/**
|
|
272
|
+
* Sets the maximum allowed date of the Calendar. Defaults to `2099-12-31`.
|
|
273
|
+
*/
|
|
274
|
+
max?: Date;
|
|
275
|
+
/**
|
|
276
|
+
* Sets the minimum allowed date of the Calendar. Defaults to `1900-1-1`.
|
|
277
|
+
*/
|
|
278
|
+
min?: Date;
|
|
279
|
+
/**
|
|
280
|
+
* Determines if the navigation sidebar will be displayed.
|
|
281
|
+
*/
|
|
282
|
+
navigation?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* **Deprecated**
|
|
285
|
+
*
|
|
286
|
+
* Toggles the smooth scroll animation on navigation item click. By default, the animation is enabled in React 17.
|
|
287
|
+
*/
|
|
288
|
+
smoothScroll?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Fires each time the Calendar is blurred.
|
|
291
|
+
*/
|
|
292
|
+
onBlur?: (event: React.FocusEvent<any>) => void;
|
|
293
|
+
/**
|
|
294
|
+
* Fires each time the Calendar is focused.
|
|
295
|
+
*/
|
|
296
|
+
onFocus?: (event: React.FocusEvent<any>) => void;
|
|
297
|
+
/**
|
|
298
|
+
* Sets the `tabIndex` property of the Calendar.
|
|
299
|
+
*/
|
|
300
|
+
tabIndex?: number;
|
|
301
|
+
/**
|
|
302
|
+
* Defines the topmost view to which the user can navigate.
|
|
303
|
+
*/
|
|
304
|
+
topView?: ActiveView;
|
|
305
|
+
/**
|
|
306
|
+
* Determines if the week number column will be displayed.
|
|
307
|
+
*/
|
|
308
|
+
weekNumber?: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* Enables the customization or the override of the default Calendar cell
|
|
311
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-cells-inside-the-view)).
|
|
312
|
+
*/
|
|
313
|
+
cell?: React.ComponentType<CalendarCellProps>;
|
|
314
|
+
/**
|
|
315
|
+
* Enables the customization or the override of the default week-column cell in the Calendar
|
|
316
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-cells-inside-the-week-column)).
|
|
317
|
+
*/
|
|
318
|
+
weekCell?: React.ComponentType<CalendarWeekCellProps>;
|
|
319
|
+
/**
|
|
320
|
+
* Enables the customization or the override of the default header title in the Calendar
|
|
321
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-titles-of-current-views)).
|
|
322
|
+
*/
|
|
323
|
+
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
324
|
+
/**
|
|
325
|
+
* Enables the customization or the override of the default navigation item in the Calendar
|
|
326
|
+
* ([see example]({% slug custom_rendering_calendar %}#toc-items-in-the-side-navigation)).
|
|
327
|
+
*/
|
|
328
|
+
navigationItem?: React.ComponentType<CalendarNavigationItemProps>;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @hidden
|
|
333
|
+
*/
|
|
334
|
+
declare interface CalendarState {
|
|
335
|
+
value: Date | null;
|
|
336
|
+
activeView: CalendarViewEnum;
|
|
337
|
+
focusedDate: Date;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* The Enum which defines all possible Calendar view types.
|
|
342
|
+
*/
|
|
343
|
+
export declare enum CalendarViewEnum {
|
|
344
|
+
month = 0,
|
|
345
|
+
year = 1,
|
|
346
|
+
decade = 2,
|
|
347
|
+
century = 3
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The `CalendarWeekCell` component is internally used for rendering the week cells inside the `month` view of the Calendar. Also used as a [custom week cell for the Calendar]({% slug api_dateinputs_calendarprops %}#toc-weekcell) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-weekcell) components.
|
|
352
|
+
*
|
|
353
|
+
* * [Customizing week-column cells in the Calendar]({% slug custom_rendering_calendar %}#toc-cells-inside-the-week-column)
|
|
354
|
+
* * [Customizing week-column cells in the MultiViewCalendar]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-week-column)
|
|
355
|
+
*/
|
|
356
|
+
export declare class CalendarWeekCell extends React_2.Component<CalendarWeekCellProps> {
|
|
357
|
+
/**
|
|
358
|
+
* @return
|
|
359
|
+
* Returns a `<td />` element with the [`value`]({% slug api_dateinputs_calendarweekcellprops %}#toc-value) as a child.
|
|
360
|
+
*/
|
|
361
|
+
render(): JSX_2.Element;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The props which will be received by the custom week cell of the [Calendar]({% slug api_dateinputs_calendarprops %}#toc-weekcell) and the [MultiViewCalendar]({% slug api_dateinputs_multiviewcalendarprops %}#toc-weekcell).
|
|
366
|
+
*/
|
|
367
|
+
export declare interface CalendarWeekCellProps {
|
|
368
|
+
id?: string;
|
|
369
|
+
value?: number | null;
|
|
370
|
+
style?: React_2.CSSProperties;
|
|
371
|
+
children?: React_2.ReactNode;
|
|
372
|
+
className?: string;
|
|
373
|
+
firstDate: Date;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/** @hidden */
|
|
377
|
+
export declare class CalendarWithoutContext extends React_2.Component<CalendarProps, CalendarState> {
|
|
378
|
+
/**
|
|
379
|
+
* @hidden
|
|
380
|
+
*/
|
|
381
|
+
static displayName: string;
|
|
382
|
+
/**
|
|
383
|
+
* @hidden
|
|
384
|
+
*/
|
|
385
|
+
static propTypes: {
|
|
386
|
+
className: PropTypes.Requireable<string>;
|
|
387
|
+
defaultActiveView: PropTypes.Requireable<ActiveView>;
|
|
388
|
+
defaultValue: PropTypes.Requireable<Date>;
|
|
389
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
390
|
+
focusedDate: PropTypes.Requireable<Date>;
|
|
391
|
+
id: PropTypes.Requireable<string>;
|
|
392
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
393
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
394
|
+
max: PropTypes.Requireable<Date>;
|
|
395
|
+
min: PropTypes.Requireable<Date>;
|
|
396
|
+
navigation: PropTypes.Requireable<boolean>;
|
|
397
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
398
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
399
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
400
|
+
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
401
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
402
|
+
value: PropTypes.Requireable<Date>;
|
|
403
|
+
weekNumber: PropTypes.Requireable<boolean>;
|
|
404
|
+
topView: (props: CalendarProps, propName: keyof CalendarProps<any>, componentName: string) => Error | null;
|
|
405
|
+
bottomView: (props: CalendarProps, propName: keyof CalendarProps<any>, componentName: string) => Error | null;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* @hidden
|
|
409
|
+
*/
|
|
410
|
+
static defaultProps: {
|
|
411
|
+
disabled: boolean;
|
|
412
|
+
min: Date;
|
|
413
|
+
max: Date;
|
|
414
|
+
navigation: boolean;
|
|
415
|
+
defaultActiveView: ActiveView;
|
|
416
|
+
defaultValue: null;
|
|
417
|
+
topView: ActiveView;
|
|
418
|
+
bottomView: ActiveView;
|
|
419
|
+
};
|
|
420
|
+
protected dom: DOMService;
|
|
421
|
+
protected scrollSyncService: ScrollSyncService | null;
|
|
422
|
+
private valueDuringOnChange?;
|
|
423
|
+
private focusedDate;
|
|
424
|
+
private get cellUID();
|
|
425
|
+
private get id();
|
|
426
|
+
private Navigation;
|
|
427
|
+
private calendarViewList;
|
|
428
|
+
private _element;
|
|
429
|
+
private intl;
|
|
430
|
+
private bus;
|
|
431
|
+
private service;
|
|
432
|
+
private navigation;
|
|
433
|
+
private isActive;
|
|
434
|
+
private oldValue;
|
|
435
|
+
private didNavigationChange;
|
|
436
|
+
/**
|
|
437
|
+
* Gets the wrapping element of the Calendar.
|
|
438
|
+
*/
|
|
439
|
+
get element(): HTMLDivElement | null;
|
|
440
|
+
/**
|
|
441
|
+
* Gets the value of the Calendar.
|
|
442
|
+
*/
|
|
443
|
+
get value(): Date | null;
|
|
444
|
+
protected get min(): Date;
|
|
445
|
+
protected get max(): Date;
|
|
446
|
+
protected get bottomView(): CalendarViewEnum;
|
|
447
|
+
protected get topView(): CalendarViewEnum;
|
|
448
|
+
constructor(props: CalendarProps);
|
|
449
|
+
/**
|
|
450
|
+
* @hidden
|
|
451
|
+
*/
|
|
452
|
+
componentDidMount(): void;
|
|
453
|
+
/**
|
|
454
|
+
* @hidden
|
|
455
|
+
*/
|
|
456
|
+
componentDidUpdate(prevProps: CalendarProps, prevState: CalendarState): void;
|
|
457
|
+
/**
|
|
458
|
+
* @hidden
|
|
459
|
+
*/
|
|
460
|
+
focus: () => void;
|
|
461
|
+
/**
|
|
462
|
+
* @hidden
|
|
463
|
+
*/
|
|
464
|
+
render(): JSX_2.Element;
|
|
465
|
+
private shouldScroll;
|
|
466
|
+
private handleScroll;
|
|
467
|
+
private handleNavigationChange;
|
|
468
|
+
private handleViewChange;
|
|
469
|
+
private handleDateChange;
|
|
470
|
+
private handleFocus;
|
|
471
|
+
private handleBlur;
|
|
472
|
+
private handleKeyDown;
|
|
473
|
+
private handleMouseDown;
|
|
474
|
+
private handleClick;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @hidden
|
|
479
|
+
*/
|
|
480
|
+
export declare interface CellContext {
|
|
481
|
+
formattedValue: string;
|
|
482
|
+
id: string;
|
|
483
|
+
isWeekend: boolean;
|
|
484
|
+
isFocused: boolean;
|
|
485
|
+
isSelected: boolean;
|
|
486
|
+
isInRange: boolean;
|
|
487
|
+
isRangeStart: boolean;
|
|
488
|
+
isRangeEnd: boolean;
|
|
489
|
+
isRangeMid: boolean;
|
|
490
|
+
isRangeSplitEnd?: boolean;
|
|
491
|
+
isRangeSplitStart?: boolean;
|
|
492
|
+
isToday: boolean;
|
|
493
|
+
title?: string;
|
|
494
|
+
value: Date;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @hidden
|
|
499
|
+
*/
|
|
500
|
+
export declare class CenturyViewService implements ViewService {
|
|
501
|
+
addToDate(min: Date, skip: number): Date;
|
|
502
|
+
datesList(start: Date, count: number): Date[];
|
|
503
|
+
data(options: any): CellContext[][];
|
|
504
|
+
isSelectedFromArray(candidate: Date, dates: Date[], min: Date, max: Date): boolean;
|
|
505
|
+
isEqual(candidate: Date | null, expected: Date | null): boolean;
|
|
506
|
+
isInArray(date: Date, dates: Date[]): boolean;
|
|
507
|
+
isInRange(candidate: Date, min: Date, max: Date): boolean;
|
|
508
|
+
isInSameView(candidate: Date, value: Date): boolean;
|
|
509
|
+
isRangeStart(value: Date): boolean;
|
|
510
|
+
move(value: Date, action: Action): Date;
|
|
511
|
+
cellTitle(value: Date): string;
|
|
512
|
+
navigationTitle(value?: Date): string;
|
|
513
|
+
title(value?: Date): string;
|
|
514
|
+
rowLength(_?: boolean): number;
|
|
515
|
+
skip(value: Date, min: Date): number;
|
|
516
|
+
total(min: Date, max: Date): number;
|
|
517
|
+
value(current: Date): string;
|
|
518
|
+
viewDate(date: Date, max: Date, border?: number): Date;
|
|
519
|
+
private normalize;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** @hidden */
|
|
523
|
+
export declare type DateInput = DateInputHandle;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Represents the KendoReact DateInput Component.
|
|
527
|
+
*
|
|
528
|
+
* Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
|
|
529
|
+
* Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
|
|
530
|
+
*/
|
|
531
|
+
export declare const DateInput: React_2.ForwardRefExoticComponent<DateInputProps<any> & React_2.RefAttributes<any>>;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* The arguments for the `change` event of the DateInput. The generic argument sets the target type of the event. Defaults to `DateInput`.
|
|
535
|
+
*/
|
|
536
|
+
export declare interface DateInputChangeEvent<T = DateInput> {
|
|
537
|
+
nativeEvent?: any;
|
|
538
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
539
|
+
value: Date | null;
|
|
540
|
+
target: T;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* The interface which defines a custom-format placeholder structure in the DateInput.
|
|
545
|
+
*/
|
|
546
|
+
export declare interface DateInputCustomFormatPlaceholder {
|
|
547
|
+
/**
|
|
548
|
+
* Defines the description for the `year` format section.
|
|
549
|
+
*/
|
|
550
|
+
year?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Defines the description for the `month` format section.
|
|
553
|
+
*/
|
|
554
|
+
month?: string;
|
|
555
|
+
/**
|
|
556
|
+
* Defines the description for the `day` format section.
|
|
557
|
+
*/
|
|
558
|
+
day?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Defines the description for the `hour` format section.
|
|
561
|
+
*/
|
|
562
|
+
hour?: string;
|
|
563
|
+
/**
|
|
564
|
+
* Defines the description for the `minute` format section.
|
|
565
|
+
*/
|
|
566
|
+
minute?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Defines the description for the `second` format section.
|
|
569
|
+
*/
|
|
570
|
+
second?: string;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The union type which defines all possible format options of the DateInput placeholder.
|
|
575
|
+
*
|
|
576
|
+
* The available options are:
|
|
577
|
+
* * `'wide'`—Displays the full description of the format section. For example, turns `MM` into `month`. Retrieved from [CLDR](https://github.com/telerik/kendo-intl/blob/develop/docs/cldr/index.md).
|
|
578
|
+
* * `'narrow'`—Displays the narrow description of the format section. For example, turns `MM` into `mo.`. Retrieved from [CLDR](https://github.com/telerik/kendo-intl/blob/develop/docs/cldr/index.md).
|
|
579
|
+
* * `'short'`—Displays the short description of the format section. For example, turns `MM` into `mo.`. Retrieved from [CLDR](https://github.com/telerik/kendo-intl/blob/develop/docs/cldr/index.md).
|
|
580
|
+
* * `'formatPattern'`—Directly displays the format section. For example, turns `MM` into `MM`.
|
|
581
|
+
*/
|
|
582
|
+
export declare type DateInputFormatPlaceholder = 'wide' | 'narrow' | 'short' | 'formatPattern' | DateInputCustomFormatPlaceholder;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Represent the `ref` of the DateInput component.
|
|
586
|
+
*/
|
|
587
|
+
export declare interface DateInputHandle extends Pick<DateInputWithoutContext, keyof DateInputWithoutContext> {
|
|
588
|
+
/**
|
|
589
|
+
* Returns the HTML element of the DateInput component.
|
|
590
|
+
*/
|
|
591
|
+
element: HTMLInputElement | null;
|
|
592
|
+
/**
|
|
593
|
+
* Gets the `name` property of the DateInput.
|
|
594
|
+
*/
|
|
595
|
+
name: string | undefined;
|
|
596
|
+
/**
|
|
597
|
+
* Returns the `value` of the DateInput component.
|
|
598
|
+
*/
|
|
599
|
+
value: Date | null;
|
|
600
|
+
/**
|
|
601
|
+
* Represents the validity state into which the DateInput is set.
|
|
602
|
+
*/
|
|
603
|
+
validity: FormComponentValidity;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* The interface which defines all possible incremental steps in the DateInput.
|
|
608
|
+
*/
|
|
609
|
+
export declare interface DateInputIncrementalSteps {
|
|
610
|
+
year?: number;
|
|
611
|
+
month?: number;
|
|
612
|
+
day?: number;
|
|
613
|
+
hour?: number;
|
|
614
|
+
minute?: number;
|
|
615
|
+
second?: number;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Represents the props of the [KendoReact DateInput component]({% slug overview_dateinput %}). The generic argument is passed to the `onChange` property and is used as a target in the [`DateInputChangeEvent`]({% slug api_dateinputs_dateinputchangeevent %}) interface.
|
|
620
|
+
*/
|
|
621
|
+
export declare interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
|
|
622
|
+
/** @hidden */
|
|
623
|
+
_ref?: React_2.MutableRefObject<DateInput | null>;
|
|
624
|
+
/**
|
|
625
|
+
* @hidden
|
|
626
|
+
*/
|
|
627
|
+
children?: React_2.ReactNode;
|
|
628
|
+
/**
|
|
629
|
+
* @hidden
|
|
630
|
+
*/
|
|
631
|
+
disableSelection?: boolean;
|
|
632
|
+
/**
|
|
633
|
+
* Sets a class of the DateInput DOM element.
|
|
634
|
+
*/
|
|
635
|
+
className?: string;
|
|
636
|
+
/**
|
|
637
|
+
* Specifies the value of the DateInput.
|
|
638
|
+
*/
|
|
639
|
+
value?: Date | null;
|
|
640
|
+
/**
|
|
641
|
+
* Specifies the default value of the DateInput. If `value` is not set, this value will correspond to the initial value.
|
|
642
|
+
*/
|
|
643
|
+
defaultValue?: Date | null;
|
|
644
|
+
/**
|
|
645
|
+
* Indicates the availability of interactive popup element that can be triggered by an element. By default the property is set to `grid`.
|
|
646
|
+
*/
|
|
647
|
+
ariaHasPopup?: boolean | 'grid' | 'dialog';
|
|
648
|
+
/**
|
|
649
|
+
* Indicates whether the element is currently expanded or collapsed.
|
|
650
|
+
*/
|
|
651
|
+
ariaExpanded?: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Specifies the role of the DateInput.
|
|
654
|
+
*/
|
|
655
|
+
ariaRole?: string;
|
|
656
|
+
/**
|
|
657
|
+
* Identifies the element whose contents or presence are controlled by the current element.
|
|
658
|
+
*/
|
|
659
|
+
ariaControls?: string;
|
|
660
|
+
/**
|
|
661
|
+
* Determines the event handler that will be fired when the user edits the value ([see example]({% slug dateranges_dateinput %})).
|
|
662
|
+
*/
|
|
663
|
+
onChange?: (event: DateInputChangeEvent<T>) => void;
|
|
664
|
+
/**
|
|
665
|
+
* Configures the `size` of the DateInput.
|
|
666
|
+
*
|
|
667
|
+
* The available options are:
|
|
668
|
+
* - small
|
|
669
|
+
* - medium
|
|
670
|
+
* - large
|
|
671
|
+
* - null—Does not set a size `className`.
|
|
672
|
+
*
|
|
673
|
+
* @default `medium`
|
|
674
|
+
*/
|
|
675
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
676
|
+
/**
|
|
677
|
+
* Configures the `roundness` of the DateInput.
|
|
678
|
+
*
|
|
679
|
+
* The available options are:
|
|
680
|
+
* - small
|
|
681
|
+
* - medium
|
|
682
|
+
* - large
|
|
683
|
+
* - full
|
|
684
|
+
* - null—Does not set a rounded `className`.
|
|
685
|
+
*
|
|
686
|
+
* @default `medium`
|
|
687
|
+
*/
|
|
688
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
689
|
+
/**
|
|
690
|
+
* Configures the `fillMode` of the DateInput.
|
|
691
|
+
*
|
|
692
|
+
* The available options are:
|
|
693
|
+
* - solid
|
|
694
|
+
* - outline
|
|
695
|
+
* - flat
|
|
696
|
+
* - null—Does not set a fillMode `className`.
|
|
697
|
+
*
|
|
698
|
+
* @default `solid`
|
|
699
|
+
*/
|
|
700
|
+
fillMode?: null | 'solid' | 'flat' | 'outline';
|
|
701
|
+
/**
|
|
702
|
+
* Determines whether the DateInput is in its read-only state.
|
|
703
|
+
*/
|
|
704
|
+
readonly?: boolean;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Represents the PropsContext of the `DateInput` component.
|
|
709
|
+
* Used for global configuration of all `DateInput` instances.
|
|
710
|
+
*
|
|
711
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
712
|
+
*/
|
|
713
|
+
export declare const DateInputPropsContext: React_2.Context<(p: DateInputProps<any>) => DateInputProps<any>>;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* @hidden
|
|
717
|
+
*/
|
|
718
|
+
export declare interface DateInputSettings {
|
|
719
|
+
/**
|
|
720
|
+
* Specifies the `date` format which is used for formatting the value ([see example]({% slug formats_dateinput %})). If not set, the default format will be used.
|
|
721
|
+
*/
|
|
722
|
+
format?: string | DateFormatOptions;
|
|
723
|
+
/**
|
|
724
|
+
* Specifies the descriptions of the format sections in the input field ([more information and example]({% slug placeholders_dateinput %})).
|
|
725
|
+
*/
|
|
726
|
+
formatPlaceholder?: DateInputFormatPlaceholder;
|
|
727
|
+
/**
|
|
728
|
+
* Specifies the width of the DateInput.
|
|
729
|
+
*/
|
|
730
|
+
width?: number | string;
|
|
731
|
+
/**
|
|
732
|
+
* Sets the `tabIndex` property of the DateInput.
|
|
733
|
+
*/
|
|
734
|
+
tabIndex?: number;
|
|
735
|
+
/**
|
|
736
|
+
* Sets the title of the `input` element of the DateInput.
|
|
737
|
+
*/
|
|
738
|
+
title?: string;
|
|
739
|
+
/**
|
|
740
|
+
* Specifies the incremental steps of the DateInput ([see example]({% slug incrementalsteps_dateinput %})).
|
|
741
|
+
*
|
|
742
|
+
* The available options are:
|
|
743
|
+
* - `year: Number`—Controls the incremental step of the year value.
|
|
744
|
+
* - `month: Number`—Controls the incremental step of the month value.
|
|
745
|
+
* - `day: Number`—Controls the incremental step of the day value.
|
|
746
|
+
* - `hour: Number`—Controls the incremental step of the hour value.
|
|
747
|
+
* - `minute: Number`—Controls the incremental step of the minute value.
|
|
748
|
+
* - `second: Number`—Controls the incremental step of the second value.
|
|
749
|
+
*/
|
|
750
|
+
steps?: DateInputIncrementalSteps;
|
|
751
|
+
/**
|
|
752
|
+
* Specifies the smallest date that is valid ([see example]({% slug dateranges_dateinput %})).
|
|
753
|
+
*/
|
|
754
|
+
min?: Date;
|
|
755
|
+
/**
|
|
756
|
+
* Specifies the greatest date that is valid ([see example]({% slug dateranges_dateinput %})).
|
|
757
|
+
*/
|
|
758
|
+
max?: Date;
|
|
759
|
+
/**
|
|
760
|
+
* Specifies the smallest time that is valid ([see example]({% slug dateranges_dateinput %}#toc-limiting-the-time-range)).
|
|
761
|
+
*/
|
|
762
|
+
minTime?: Date;
|
|
763
|
+
/**
|
|
764
|
+
* Specifies the greatest time that is valid ([see example]({% slug dateranges_dateinput %}#toc-limiting-the-time-range)).
|
|
765
|
+
*/
|
|
766
|
+
maxTime?: Date;
|
|
767
|
+
/**
|
|
768
|
+
* Determines whether the DateInput is disabled ([see example]({% slug disabled_dateinput %})).
|
|
769
|
+
*/
|
|
770
|
+
disabled?: boolean;
|
|
771
|
+
/**
|
|
772
|
+
* Specifies whether the **Up** and **Down** spin buttons will be rendered ([see example]({% slug spinbuttons_dateinput %})).
|
|
773
|
+
*/
|
|
774
|
+
spinners?: boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Specifies the name property of the input DOM element.
|
|
777
|
+
*/
|
|
778
|
+
name?: string;
|
|
779
|
+
/**
|
|
780
|
+
* Represents the `dir` HTML attribute.
|
|
781
|
+
*/
|
|
782
|
+
dir?: string;
|
|
783
|
+
/**
|
|
784
|
+
* Renders a floating label for the DateInput.
|
|
785
|
+
*/
|
|
786
|
+
label?: string;
|
|
787
|
+
/**
|
|
788
|
+
* Sets the `id` of the `input` DOM element.
|
|
789
|
+
*/
|
|
790
|
+
id?: string;
|
|
791
|
+
/**
|
|
792
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
793
|
+
* For example these elements could contain error or hint message.
|
|
794
|
+
*/
|
|
795
|
+
ariaDescribedBy?: string;
|
|
796
|
+
/**
|
|
797
|
+
* Identifies the element(s) which will label the component.
|
|
798
|
+
*/
|
|
799
|
+
ariaLabelledBy?: string;
|
|
800
|
+
/**
|
|
801
|
+
* The accessible label of the component.
|
|
802
|
+
*/
|
|
803
|
+
ariaLabel?: string;
|
|
804
|
+
/**
|
|
805
|
+
* Specifies the hint the DateInput displays when its value is `null` or there is no partial selection.
|
|
806
|
+
* For more information, refer to the article on
|
|
807
|
+
* [placeholders]({% slug placeholders_dateinput %}).
|
|
808
|
+
*/
|
|
809
|
+
placeholder?: string | null;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* @hidden
|
|
814
|
+
*/
|
|
815
|
+
export declare const dateInputsMessages: {
|
|
816
|
+
"calendar.today": string;
|
|
817
|
+
"timepicker.now": string;
|
|
818
|
+
"timepicker.set": string;
|
|
819
|
+
"timepicker.cancel": string;
|
|
820
|
+
"datetimepicker.date": string;
|
|
821
|
+
"datetimepicker.time": string;
|
|
822
|
+
"datetimepicker.cancel": string;
|
|
823
|
+
"datetimepicker.set": string;
|
|
824
|
+
"daterangepicker.cancel": string;
|
|
825
|
+
"daterangepicker.set": string;
|
|
826
|
+
"daterangepicker.start": string;
|
|
827
|
+
"daterangepicker.end": string;
|
|
828
|
+
"daterangepicker.separator": string;
|
|
829
|
+
"timepicker.selectNow": string;
|
|
830
|
+
"timepicker.toggleTimeSelector": string;
|
|
831
|
+
"timepicker.toggleClock": string;
|
|
832
|
+
"dateinput.increment": string;
|
|
833
|
+
"dateinput.decrement": string;
|
|
834
|
+
"datepicker.toggleCalendar": string;
|
|
835
|
+
"multiviewcalendar.prevView": string;
|
|
836
|
+
"multiviewcalendar.nextView": string;
|
|
837
|
+
"daterangepicker.swapStartEnd": string;
|
|
838
|
+
"datetimepicker.toggleDateTimeSelector": string;
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
declare interface DateInputsPopupSettings {
|
|
842
|
+
/**
|
|
843
|
+
* Controls the popup animation. By default, the open and close animations are enabled.
|
|
844
|
+
*/
|
|
845
|
+
animate?: boolean;
|
|
846
|
+
/**
|
|
847
|
+
* Controls the popup container. By default, the popup is appended to the [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body) element.
|
|
848
|
+
*/
|
|
849
|
+
appendTo?: HTMLElement;
|
|
850
|
+
/**
|
|
851
|
+
* Specifies a list of CSS classes that are used for styling the popup.
|
|
852
|
+
*/
|
|
853
|
+
popupClass?: string;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/** @hidden */
|
|
857
|
+
export declare class DateInputWithoutContext extends React_2.Component<DateInputProps, {
|
|
858
|
+
focused: boolean;
|
|
859
|
+
}> implements FormComponent {
|
|
860
|
+
/**
|
|
861
|
+
* @hidden
|
|
862
|
+
*/
|
|
863
|
+
static displayName: string;
|
|
864
|
+
/**
|
|
865
|
+
* @hidden
|
|
866
|
+
*/
|
|
867
|
+
static propTypes: {
|
|
868
|
+
value: PropTypes.Requireable<Date>;
|
|
869
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
870
|
+
skeleton: PropTypes.Requireable<string>;
|
|
871
|
+
pattern: PropTypes.Requireable<string>;
|
|
872
|
+
date: PropTypes.Requireable<string>;
|
|
873
|
+
time: PropTypes.Requireable<string>;
|
|
874
|
+
datetime: PropTypes.Requireable<string>;
|
|
875
|
+
era: PropTypes.Requireable<string>;
|
|
876
|
+
year: PropTypes.Requireable<string>;
|
|
877
|
+
month: PropTypes.Requireable<string>;
|
|
878
|
+
day: PropTypes.Requireable<string>;
|
|
879
|
+
weekday: PropTypes.Requireable<string>;
|
|
880
|
+
hour: PropTypes.Requireable<string>;
|
|
881
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
882
|
+
minute: PropTypes.Requireable<string>;
|
|
883
|
+
second: PropTypes.Requireable<string>;
|
|
884
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
885
|
+
}> | null | undefined>>;
|
|
886
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
887
|
+
year: PropTypes.Requireable<string>;
|
|
888
|
+
month: PropTypes.Requireable<string>;
|
|
889
|
+
day: PropTypes.Requireable<string>;
|
|
890
|
+
hour: PropTypes.Requireable<string>;
|
|
891
|
+
minute: PropTypes.Requireable<string>;
|
|
892
|
+
second: PropTypes.Requireable<string>;
|
|
893
|
+
}> | null | undefined>>;
|
|
894
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
895
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
896
|
+
title: PropTypes.Requireable<string>;
|
|
897
|
+
steps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
898
|
+
year: PropTypes.Requireable<number>;
|
|
899
|
+
month: PropTypes.Requireable<number>;
|
|
900
|
+
day: PropTypes.Requireable<number>;
|
|
901
|
+
hour: PropTypes.Requireable<number>;
|
|
902
|
+
minute: PropTypes.Requireable<number>;
|
|
903
|
+
second: PropTypes.Requireable<number>;
|
|
904
|
+
}>>;
|
|
905
|
+
min: PropTypes.Requireable<Date>;
|
|
906
|
+
max: PropTypes.Requireable<Date>;
|
|
907
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
908
|
+
spinners: PropTypes.Requireable<boolean>;
|
|
909
|
+
name: PropTypes.Requireable<string>;
|
|
910
|
+
dir: PropTypes.Requireable<string>;
|
|
911
|
+
label: PropTypes.Requireable<string>;
|
|
912
|
+
id: PropTypes.Requireable<string>;
|
|
913
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
914
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
915
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
916
|
+
ariaRole: PropTypes.Requireable<string>;
|
|
917
|
+
ariaHasPopup: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
918
|
+
ariaExpanded: PropTypes.Requireable<NonNullable<boolean | null | undefined>>;
|
|
919
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
920
|
+
validationMessage: PropTypes.Requireable<string>;
|
|
921
|
+
required: PropTypes.Requireable<boolean>;
|
|
922
|
+
validate: PropTypes.Requireable<boolean>;
|
|
923
|
+
valid: PropTypes.Requireable<boolean>;
|
|
924
|
+
size: PropTypes.Requireable<"small" | "large" | "medium" | null | undefined>;
|
|
925
|
+
rounded: PropTypes.Requireable<"small" | "large" | "medium" | "full" | null | undefined>;
|
|
926
|
+
fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | null | undefined>;
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* @hidden
|
|
930
|
+
*/
|
|
931
|
+
static defaultProps: {
|
|
932
|
+
format: string;
|
|
933
|
+
size: "small" | "large" | "medium" | null | undefined;
|
|
934
|
+
rounded: "small" | "large" | "medium" | "full" | null | undefined;
|
|
935
|
+
fillMode: "flat" | "solid" | "outline" | null | undefined;
|
|
936
|
+
formatPlaceholder: DateInputFormatPlaceholder;
|
|
937
|
+
spinners: boolean;
|
|
938
|
+
disabled: boolean;
|
|
939
|
+
max: Date;
|
|
940
|
+
min: Date;
|
|
941
|
+
minTime: Date;
|
|
942
|
+
maxTime: Date;
|
|
943
|
+
required: boolean;
|
|
944
|
+
validityStyles: boolean;
|
|
945
|
+
validationMessage: string;
|
|
946
|
+
placeholder: null;
|
|
947
|
+
ariaHasPopup: string;
|
|
948
|
+
};
|
|
949
|
+
private kendoDate;
|
|
950
|
+
private currentFormat;
|
|
951
|
+
private valueDuringOnChange;
|
|
952
|
+
private paste;
|
|
953
|
+
private _element;
|
|
954
|
+
private _wrapper;
|
|
955
|
+
private get _inputId();
|
|
956
|
+
private _lastSelectedSymbol;
|
|
957
|
+
constructor(props: DateInputProps);
|
|
958
|
+
/**
|
|
959
|
+
* @hidden
|
|
960
|
+
*/
|
|
961
|
+
componentDidMount(): void;
|
|
962
|
+
/**
|
|
963
|
+
* @hidden
|
|
964
|
+
*/
|
|
965
|
+
componentDidUpdate(_: any, prevState: any): void;
|
|
966
|
+
/**
|
|
967
|
+
* @hidden
|
|
968
|
+
*/
|
|
969
|
+
componentWillUnmount(): void;
|
|
970
|
+
/**
|
|
971
|
+
* @hidden
|
|
972
|
+
*/
|
|
973
|
+
render(): any;
|
|
974
|
+
/**
|
|
975
|
+
* Gets the value of the DateInput.
|
|
976
|
+
*/
|
|
977
|
+
get value(): Date | null;
|
|
978
|
+
/**
|
|
979
|
+
* Gets the `name` property of the DateInput.
|
|
980
|
+
*/
|
|
981
|
+
get name(): string | undefined;
|
|
982
|
+
protected get min(): Date;
|
|
983
|
+
protected get max(): Date;
|
|
984
|
+
/**
|
|
985
|
+
* @hidden
|
|
986
|
+
*/
|
|
987
|
+
get text(): string;
|
|
988
|
+
/**
|
|
989
|
+
* Represents the validity state into which the DateInput is set.
|
|
990
|
+
*/
|
|
991
|
+
get validity(): FormComponentValidity;
|
|
992
|
+
/**
|
|
993
|
+
* Gets the element of the DateInput.
|
|
994
|
+
*
|
|
995
|
+
* @return - An `HTMLInputElement`.
|
|
996
|
+
*
|
|
997
|
+
* @example
|
|
998
|
+
* ```jsx
|
|
999
|
+
* class App extends React.Component {
|
|
1000
|
+
* constructor(props) {
|
|
1001
|
+
* super(props);
|
|
1002
|
+
* }
|
|
1003
|
+
* element = null;
|
|
1004
|
+
* render() {
|
|
1005
|
+
* return (
|
|
1006
|
+
* <div>
|
|
1007
|
+
* <DateInput
|
|
1008
|
+
* ref={(dateInput) =>
|
|
1009
|
+
* this.element = dateInput ? dateInput.element : null}
|
|
1010
|
+
* />
|
|
1011
|
+
* <button onClick={() => console.log(this.element)}>console.log the element</button>
|
|
1012
|
+
* </div>
|
|
1013
|
+
* );
|
|
1014
|
+
* }
|
|
1015
|
+
* }
|
|
1016
|
+
*
|
|
1017
|
+
* ReactDOM.render(
|
|
1018
|
+
* <App />,
|
|
1019
|
+
* document.getElementsByTagName('my-app')[0]
|
|
1020
|
+
* );
|
|
1021
|
+
* ```
|
|
1022
|
+
*/
|
|
1023
|
+
get element(): HTMLInputElement | null;
|
|
1024
|
+
/**
|
|
1025
|
+
* @hidden
|
|
1026
|
+
*/
|
|
1027
|
+
focus: () => void;
|
|
1028
|
+
/**
|
|
1029
|
+
* @hidden
|
|
1030
|
+
*/
|
|
1031
|
+
protected get validityStyles(): boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
* @hidden
|
|
1034
|
+
*/
|
|
1035
|
+
protected get required(): boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* @hidden
|
|
1038
|
+
*/
|
|
1039
|
+
protected get wrapper(): HTMLSpanElement | null;
|
|
1040
|
+
/**
|
|
1041
|
+
* @hidden
|
|
1042
|
+
*/
|
|
1043
|
+
intl(): IntlService;
|
|
1044
|
+
/**
|
|
1045
|
+
* @hidden
|
|
1046
|
+
*/
|
|
1047
|
+
protected setValidity: () => void;
|
|
1048
|
+
protected updateOnPaste: (event: React_2.SyntheticEvent<HTMLInputElement>) => void;
|
|
1049
|
+
private spinnersMouseDown;
|
|
1050
|
+
private handlePaste;
|
|
1051
|
+
private elementChange;
|
|
1052
|
+
private elementClick;
|
|
1053
|
+
private nativeWheel;
|
|
1054
|
+
private wheel;
|
|
1055
|
+
private increasePart;
|
|
1056
|
+
private decreasePart;
|
|
1057
|
+
private elementKeyDown;
|
|
1058
|
+
private elementOnFocus;
|
|
1059
|
+
private elementOnBlur;
|
|
1060
|
+
private get selection();
|
|
1061
|
+
private setSelection;
|
|
1062
|
+
private triggerChange;
|
|
1063
|
+
private selectionBySymbol;
|
|
1064
|
+
private selectionByIndex;
|
|
1065
|
+
private switchDateSegment;
|
|
1066
|
+
private modifyDateSegmentValue;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/** @hidden */
|
|
1070
|
+
export declare type DatePicker = DatePickerHandle;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Represents the KendoReact DatePicker Component.
|
|
1074
|
+
*
|
|
1075
|
+
* Accepts properties of type [DatePickerProps]({% slug api_dateinputs_datepickerprops %}).
|
|
1076
|
+
* Obtaining the `ref` returns an object of type [DatePickerHandle]({% slug api_dateinputs_datepickerhandle %}).
|
|
1077
|
+
*/
|
|
1078
|
+
export declare const DatePicker: React_2.ForwardRefExoticComponent<DatePickerProps & React_2.RefAttributes<any>>;
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* The arguments for the `onChange` event of the DatePicker.
|
|
1082
|
+
*/
|
|
1083
|
+
export declare interface DatePickerChangeEvent {
|
|
1084
|
+
nativeEvent?: any;
|
|
1085
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
1086
|
+
value: Date | null;
|
|
1087
|
+
show: boolean;
|
|
1088
|
+
target: DatePicker;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* The arguments for the `onClose` event of the DatePicker.
|
|
1093
|
+
*/
|
|
1094
|
+
export declare interface DatePickerCloseEvent {
|
|
1095
|
+
target: DatePicker;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Represent the `ref` of the DatePicker component.
|
|
1100
|
+
*/
|
|
1101
|
+
export declare interface DatePickerHandle extends Pick<DatePickerWithoutContext, keyof DatePickerWithoutContext> {
|
|
1102
|
+
/**
|
|
1103
|
+
* Returns the HTML element of the DatePicker component.
|
|
1104
|
+
*/
|
|
1105
|
+
element: HTMLSpanElement | null;
|
|
1106
|
+
/**
|
|
1107
|
+
* Gets the Calendar component inside the DatePicker component.
|
|
1108
|
+
*/
|
|
1109
|
+
calendar: Calendar | null;
|
|
1110
|
+
/**
|
|
1111
|
+
* Gets the DateInput component inside the DatePicker component.
|
|
1112
|
+
*/
|
|
1113
|
+
dateInput: DateInput | null;
|
|
1114
|
+
/**
|
|
1115
|
+
* Gets the `name` property of the DatePicker.
|
|
1116
|
+
*/
|
|
1117
|
+
name: string | undefined;
|
|
1118
|
+
/**
|
|
1119
|
+
* Gets the popup state of the DatePicker.
|
|
1120
|
+
*/
|
|
1121
|
+
show: boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* Represents the validity state into which the DatePicker is set.
|
|
1124
|
+
*/
|
|
1125
|
+
validity: FormComponentValidity;
|
|
1126
|
+
/**
|
|
1127
|
+
* Gets the value of the DatePicker.
|
|
1128
|
+
*/
|
|
1129
|
+
value: Date | null;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* The arguments for the `onOpen` event of the DatePicker.
|
|
1134
|
+
*/
|
|
1135
|
+
export declare interface DatePickerOpenEvent {
|
|
1136
|
+
target: DatePicker;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Represents the props of the [KendoReact DatePicker component]({% slug overview_datepicker %}).
|
|
1141
|
+
*/
|
|
1142
|
+
export declare interface DatePickerProps extends DatePickerSettings, FormComponentProps {
|
|
1143
|
+
/**
|
|
1144
|
+
* Sets the default value of the DatePicker ([see example]({% slug default_value_datepicker %})).
|
|
1145
|
+
*/
|
|
1146
|
+
defaultValue?: Date | null;
|
|
1147
|
+
/**
|
|
1148
|
+
* Fires each time the user selects a new value ([see example]({% slug controlled_datepicker %}#toc-controlling-the-date-value)).
|
|
1149
|
+
*/
|
|
1150
|
+
onChange?: (event: DatePickerChangeEvent) => void;
|
|
1151
|
+
/**
|
|
1152
|
+
* Fires each time the popup is opened.
|
|
1153
|
+
*/
|
|
1154
|
+
onOpen?: (event: DatePickerOpenEvent) => void;
|
|
1155
|
+
/**
|
|
1156
|
+
* Fires each time the popup is closed.
|
|
1157
|
+
*/
|
|
1158
|
+
onClose?: (event: DatePickerCloseEvent) => void;
|
|
1159
|
+
/**
|
|
1160
|
+
* Specifies the value of the DatePicker ([see example]({% slug controlled_datepicker %}#toc-controlling-the-date-value)).
|
|
1161
|
+
*
|
|
1162
|
+
* > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
|
|
1163
|
+
*/
|
|
1164
|
+
value?: Date | null;
|
|
1165
|
+
/**
|
|
1166
|
+
* Configures the `size` of the DatePicker.
|
|
1167
|
+
*
|
|
1168
|
+
* The available options are:
|
|
1169
|
+
* - small
|
|
1170
|
+
* - medium
|
|
1171
|
+
* - large
|
|
1172
|
+
* - null—Does not set a size `className`.
|
|
1173
|
+
*
|
|
1174
|
+
* @default `medium`
|
|
1175
|
+
*/
|
|
1176
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
1177
|
+
/**
|
|
1178
|
+
* Configures the `roundness` of the DatePicker.
|
|
1179
|
+
*
|
|
1180
|
+
* The available options are:
|
|
1181
|
+
* - small
|
|
1182
|
+
* - medium
|
|
1183
|
+
* - large
|
|
1184
|
+
* - full
|
|
1185
|
+
* - null—Does not set a rounded `className`.
|
|
1186
|
+
*
|
|
1187
|
+
* @default `medium`
|
|
1188
|
+
*/
|
|
1189
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
1190
|
+
/**
|
|
1191
|
+
* Configures the `fillMode` of the DatePicker.
|
|
1192
|
+
*
|
|
1193
|
+
* The available options are:
|
|
1194
|
+
* - solid
|
|
1195
|
+
* - outline
|
|
1196
|
+
* - flat
|
|
1197
|
+
* - null—Does not set a fillMode `className`.
|
|
1198
|
+
*
|
|
1199
|
+
* @default `solid`
|
|
1200
|
+
*/
|
|
1201
|
+
fillMode?: null | 'solid' | 'flat' | 'outline';
|
|
1202
|
+
/**
|
|
1203
|
+
* Providing different rendering of the popup element based on the screen dimensions.
|
|
1204
|
+
*/
|
|
1205
|
+
adaptive?: boolean;
|
|
1206
|
+
/**
|
|
1207
|
+
* Specifies the text that is rendered as title in the adaptive popup.
|
|
1208
|
+
*/
|
|
1209
|
+
adaptiveTitle?: string;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Represents the PropsContext of the `DatePicker` component.
|
|
1214
|
+
* Used for global configuration of all `DatePicker` instances.
|
|
1215
|
+
*
|
|
1216
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
1217
|
+
*/
|
|
1218
|
+
export declare const DatePickerPropsContext: React_2.Context<(p: DatePickerProps) => DatePickerProps>;
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* @hidden
|
|
1222
|
+
*/
|
|
1223
|
+
export declare interface DatePickerSettings {
|
|
1224
|
+
/**
|
|
1225
|
+
* @deprecated The `DatePicker` no longer renders a `wrapper` around the DatePicker.
|
|
1226
|
+
*/
|
|
1227
|
+
pickerWrap?: React.ComponentType<PickerWrapProps>;
|
|
1228
|
+
/**
|
|
1229
|
+
* Enables the customization or the override of the default Toggle button which is rendered by the DatePicker
|
|
1230
|
+
* ([see example]({% slug custom_rendering_datepicker %}#toc-customizing-the-toggle-button)).
|
|
1231
|
+
*/
|
|
1232
|
+
toggleButton?: React.ComponentType<ToggleButtonProps>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Enables the customization or the override of the default Calendar which is rendered by the DatePicker
|
|
1235
|
+
* ([see example]({% slug custom_rendering_datepicker %}#toc-customizing-the-calendar)).
|
|
1236
|
+
*/
|
|
1237
|
+
calendar?: React.ComponentType<CalendarProps<any>> | React.ComponentType<MultiViewCalendarProps<any>>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Enables the customization or the override of the default Popup which is rendered by the DatePicker
|
|
1240
|
+
* ([see example]({% slug custom_rendering_datepicker %}#toc-customizing-the-popup)).
|
|
1241
|
+
*/
|
|
1242
|
+
popup?: React.ComponentType<PopupProps>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Enables the customization or the override of the default DateInput which is rendered by the DatePicker
|
|
1245
|
+
* ([see example]({% slug custom_rendering_datepicker %}#toc-customizing-the-dateinput)).
|
|
1246
|
+
*/
|
|
1247
|
+
dateInput?: React.ComponentType<DateInputProps<any>>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Sets the `className` of the DatePicker.
|
|
1250
|
+
*/
|
|
1251
|
+
className?: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* Sets the default state of the DatePicker upon render ([see example]({% slug default_value_datepicker %})).
|
|
1254
|
+
*/
|
|
1255
|
+
defaultShow?: boolean;
|
|
1256
|
+
/**
|
|
1257
|
+
* Determines whether the DatePicker is disabled ([see example]({% slug disabled_datepicker %})).
|
|
1258
|
+
*/
|
|
1259
|
+
disabled?: boolean;
|
|
1260
|
+
/**
|
|
1261
|
+
* Specifies the focused date of the DatePicker ([see example]({% slug dates_datepicker %})).
|
|
1262
|
+
*/
|
|
1263
|
+
focusedDate?: Date;
|
|
1264
|
+
/**
|
|
1265
|
+
* Specifies the date format that is used to display the input value ([see example]({% slug formats_datepicker %})).
|
|
1266
|
+
*/
|
|
1267
|
+
format?: string | DateFormatOptions;
|
|
1268
|
+
/**
|
|
1269
|
+
* Defines the descriptions of the format sections in the input field ([more information and examples]({% slug placeholders_datepicker %})).
|
|
1270
|
+
*/
|
|
1271
|
+
formatPlaceholder?: DateInputFormatPlaceholder;
|
|
1272
|
+
/**
|
|
1273
|
+
* Specifies the `id` of the DatePicker.
|
|
1274
|
+
*/
|
|
1275
|
+
id?: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
1278
|
+
* For example these elements could contain error or hint message.
|
|
1279
|
+
*/
|
|
1280
|
+
ariaDescribedBy?: string;
|
|
1281
|
+
/**
|
|
1282
|
+
* Identifies the element(s) which will label the component.
|
|
1283
|
+
*/
|
|
1284
|
+
ariaLabelledBy?: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* The accessible label of the component.
|
|
1287
|
+
*/
|
|
1288
|
+
ariaLabel?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* Specifies the greatest valid date ([see example]({% slug dateranges_datepicker %})).
|
|
1291
|
+
*/
|
|
1292
|
+
max?: Date;
|
|
1293
|
+
/**
|
|
1294
|
+
* Specifies the smallest valid date ([see example]({% slug dateranges_datepicker %})).
|
|
1295
|
+
*/
|
|
1296
|
+
min?: Date;
|
|
1297
|
+
/**
|
|
1298
|
+
* Specifies the `name` property of the `input` DOM element.
|
|
1299
|
+
*/
|
|
1300
|
+
name?: string;
|
|
1301
|
+
/**
|
|
1302
|
+
* Fires each time any of the DatePicker elements gets blurred.
|
|
1303
|
+
*/
|
|
1304
|
+
onBlur?: (event: React.FocusEvent<HTMLSpanElement | HTMLDivElement>) => void;
|
|
1305
|
+
/**
|
|
1306
|
+
* Fires each time the user focuses any of the DatePicker elements.
|
|
1307
|
+
*/
|
|
1308
|
+
onFocus?: (event: React.FocusEvent<HTMLSpanElement | HTMLDivElement>) => void;
|
|
1309
|
+
/**
|
|
1310
|
+
* Configures the popup options of the DatePicker.
|
|
1311
|
+
*
|
|
1312
|
+
* The available options are:
|
|
1313
|
+
* - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
1314
|
+
* - `appendTo`: — Defines the container to which the Popup will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
1315
|
+
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
|
|
1316
|
+
*/
|
|
1317
|
+
popupSettings?: DateInputsPopupSettings;
|
|
1318
|
+
/**
|
|
1319
|
+
* Specifies if the calendar will be displayed ([see example]({% slug controlled_datepicker %}#toc-controlling-the-popup-state)).
|
|
1320
|
+
*/
|
|
1321
|
+
show?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* Sets the `tabIndex` property of the DatePicker.
|
|
1324
|
+
*/
|
|
1325
|
+
tabIndex?: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Sets the title of the `input` element of the DatePicker.
|
|
1328
|
+
*/
|
|
1329
|
+
title?: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* Determines whether to display a week number column in the `month` view of the Calendar ([see example]({% slug weeknumcolumn_datepicker %})).
|
|
1332
|
+
*/
|
|
1333
|
+
weekNumber?: boolean;
|
|
1334
|
+
/**
|
|
1335
|
+
* Specifies the width of the DatePicker.
|
|
1336
|
+
*/
|
|
1337
|
+
width?: number | string;
|
|
1338
|
+
/**
|
|
1339
|
+
* Renders a floating label for the DatePicker.
|
|
1340
|
+
*/
|
|
1341
|
+
label?: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* Specifies the hint the DateInput displays when its value is `null` or there is no partial selection.
|
|
1344
|
+
* For more information, refer to the article on
|
|
1345
|
+
* [placeholders]({% slug placeholders_datepicker %}).
|
|
1346
|
+
*/
|
|
1347
|
+
placeholder?: string | null;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* @hidden
|
|
1352
|
+
*/
|
|
1353
|
+
declare interface DatePickerState {
|
|
1354
|
+
value: Date | null;
|
|
1355
|
+
show: boolean;
|
|
1356
|
+
focused: boolean;
|
|
1357
|
+
windowWidth?: number;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
/** @hidden */
|
|
1361
|
+
export declare class DatePickerWithoutContext extends React_2.Component<DatePickerProps, DatePickerState> implements FormComponent {
|
|
1362
|
+
/**
|
|
1363
|
+
* @hidden
|
|
1364
|
+
*/
|
|
1365
|
+
static displayName: string;
|
|
1366
|
+
/**
|
|
1367
|
+
* @hidden
|
|
1368
|
+
*/
|
|
1369
|
+
static propTypes: {
|
|
1370
|
+
className: PropTypes.Requireable<string>;
|
|
1371
|
+
defaultShow: PropTypes.Requireable<boolean>;
|
|
1372
|
+
defaultValue: PropTypes.Requireable<Date>;
|
|
1373
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
1374
|
+
focusedDate: PropTypes.Requireable<Date>;
|
|
1375
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
1376
|
+
skeleton: PropTypes.Requireable<string>;
|
|
1377
|
+
pattern: PropTypes.Requireable<string>;
|
|
1378
|
+
date: PropTypes.Requireable<string>;
|
|
1379
|
+
time: PropTypes.Requireable<string>;
|
|
1380
|
+
datetime: PropTypes.Requireable<string>;
|
|
1381
|
+
era: PropTypes.Requireable<string>;
|
|
1382
|
+
year: PropTypes.Requireable<string>;
|
|
1383
|
+
month: PropTypes.Requireable<string>;
|
|
1384
|
+
day: PropTypes.Requireable<string>;
|
|
1385
|
+
weekday: PropTypes.Requireable<string>;
|
|
1386
|
+
hour: PropTypes.Requireable<string>;
|
|
1387
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
1388
|
+
minute: PropTypes.Requireable<string>;
|
|
1389
|
+
second: PropTypes.Requireable<string>;
|
|
1390
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
1391
|
+
}> | null | undefined>>;
|
|
1392
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1393
|
+
year: PropTypes.Requireable<string>;
|
|
1394
|
+
month: PropTypes.Requireable<string>;
|
|
1395
|
+
day: PropTypes.Requireable<string>;
|
|
1396
|
+
hour: PropTypes.Requireable<string>;
|
|
1397
|
+
minute: PropTypes.Requireable<string>;
|
|
1398
|
+
second: PropTypes.Requireable<string>;
|
|
1399
|
+
}> | null | undefined>>;
|
|
1400
|
+
id: PropTypes.Requireable<string>;
|
|
1401
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
1402
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
1403
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
1404
|
+
min: PropTypes.Requireable<Date>;
|
|
1405
|
+
max: PropTypes.Requireable<Date>;
|
|
1406
|
+
name: PropTypes.Requireable<string>;
|
|
1407
|
+
popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1408
|
+
animate: PropTypes.Requireable<boolean>;
|
|
1409
|
+
appendTo: PropTypes.Requireable<any>;
|
|
1410
|
+
popupClass: PropTypes.Requireable<string>;
|
|
1411
|
+
}>>;
|
|
1412
|
+
show: PropTypes.Requireable<boolean>;
|
|
1413
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
1414
|
+
title: PropTypes.Requireable<string>;
|
|
1415
|
+
value: PropTypes.Requireable<Date>;
|
|
1416
|
+
weekNumber: PropTypes.Requireable<boolean>;
|
|
1417
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
1418
|
+
validationMessage: PropTypes.Requireable<string>;
|
|
1419
|
+
required: PropTypes.Requireable<boolean>;
|
|
1420
|
+
validate: PropTypes.Requireable<boolean>;
|
|
1421
|
+
valid: PropTypes.Requireable<boolean>;
|
|
1422
|
+
size: PropTypes.Requireable<"small" | "large" | "medium" | null | undefined>;
|
|
1423
|
+
rounded: PropTypes.Requireable<"small" | "large" | "medium" | "full" | null | undefined>;
|
|
1424
|
+
fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | null | undefined>;
|
|
1425
|
+
adaptive: PropTypes.Requireable<boolean>;
|
|
1426
|
+
adaptiveTitle: PropTypes.Requireable<string>;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* @hidden
|
|
1430
|
+
*/
|
|
1431
|
+
static defaultProps: {
|
|
1432
|
+
defaultShow: boolean;
|
|
1433
|
+
defaultValue: null;
|
|
1434
|
+
dateInput: React_2.ComponentType<DateInputProps<any>>;
|
|
1435
|
+
calendar: React_2.ComponentType<CalendarProps<any>>;
|
|
1436
|
+
toggleButton: React_2.ComponentType<ToggleButtonProps>;
|
|
1437
|
+
popup: React_2.ComponentType<PopupProps>;
|
|
1438
|
+
pickerWrap: React_2.ComponentType<PickerWrapProps>;
|
|
1439
|
+
disabled: boolean;
|
|
1440
|
+
format: string;
|
|
1441
|
+
max: Date;
|
|
1442
|
+
min: Date;
|
|
1443
|
+
popupSettings: {};
|
|
1444
|
+
tabIndex: number;
|
|
1445
|
+
weekNumber: boolean;
|
|
1446
|
+
required: boolean;
|
|
1447
|
+
validityStyles: boolean;
|
|
1448
|
+
size: "small" | "large" | "medium" | null | undefined;
|
|
1449
|
+
rounded: "small" | "large" | "medium" | "full" | null | undefined;
|
|
1450
|
+
fillMode: "flat" | "solid" | "outline" | null | undefined;
|
|
1451
|
+
};
|
|
1452
|
+
/**
|
|
1453
|
+
* @hidden
|
|
1454
|
+
*/
|
|
1455
|
+
readonly state: DatePickerState;
|
|
1456
|
+
private get _popupId();
|
|
1457
|
+
private _element;
|
|
1458
|
+
private _dateInput;
|
|
1459
|
+
private _calendar;
|
|
1460
|
+
private valueDuringOnChange?;
|
|
1461
|
+
private showDuringOnChange?;
|
|
1462
|
+
private nextTickId;
|
|
1463
|
+
private shouldFocusDateInput;
|
|
1464
|
+
private prevShow;
|
|
1465
|
+
private observerResize?;
|
|
1466
|
+
private get document();
|
|
1467
|
+
constructor(props: DatePickerProps);
|
|
1468
|
+
/**
|
|
1469
|
+
* Gets the wrapping element of the DatePickerWithoutContext.
|
|
1470
|
+
*/
|
|
1471
|
+
get element(): HTMLSpanElement | null;
|
|
1472
|
+
/**
|
|
1473
|
+
* The mobile mode of the DatePicker.
|
|
1474
|
+
*/
|
|
1475
|
+
get mobileMode(): boolean;
|
|
1476
|
+
/**
|
|
1477
|
+
* Gets the DateInput component inside the DatePicker component.
|
|
1478
|
+
*/
|
|
1479
|
+
get dateInput(): DateInput | null;
|
|
1480
|
+
/**
|
|
1481
|
+
* Gets the Calendar component inside the DatePicker component.
|
|
1482
|
+
*/
|
|
1483
|
+
get calendar(): Calendar | null;
|
|
1484
|
+
/**
|
|
1485
|
+
* Gets the value of the DatePickerWithoutContext.
|
|
1486
|
+
*/
|
|
1487
|
+
get value(): Date | null;
|
|
1488
|
+
/**
|
|
1489
|
+
* Gets the popup state of the DatePickerWithoutContext.
|
|
1490
|
+
*/
|
|
1491
|
+
get show(): boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* Gets the `name` property of the DatePickerWithoutContext.
|
|
1494
|
+
*/
|
|
1495
|
+
get name(): string | undefined;
|
|
1496
|
+
protected get min(): Date;
|
|
1497
|
+
protected get max(): Date;
|
|
1498
|
+
protected get dateInputComp(): React_2.ComponentType<DateInputProps<any>>;
|
|
1499
|
+
protected get toggleButtonComp(): React_2.ComponentType<ToggleButtonProps>;
|
|
1500
|
+
protected get calendarComp(): React_2.ComponentType<CalendarProps<any>>;
|
|
1501
|
+
protected get popupComp(): React_2.ComponentType<PopupProps>;
|
|
1502
|
+
protected get pickerWrapComp(): React_2.ComponentType<PickerWrapProps>;
|
|
1503
|
+
/**
|
|
1504
|
+
* Represents the validity state into which the DatePicker is set.
|
|
1505
|
+
*/
|
|
1506
|
+
get validity(): FormComponentValidity;
|
|
1507
|
+
/**
|
|
1508
|
+
* @hidden
|
|
1509
|
+
*/
|
|
1510
|
+
protected get validityStyles(): boolean;
|
|
1511
|
+
/**
|
|
1512
|
+
* @hidden
|
|
1513
|
+
*/
|
|
1514
|
+
protected get required(): boolean;
|
|
1515
|
+
/**
|
|
1516
|
+
* @hidden
|
|
1517
|
+
*/
|
|
1518
|
+
componentDidMount(): void;
|
|
1519
|
+
/**
|
|
1520
|
+
* @hidden
|
|
1521
|
+
*/
|
|
1522
|
+
componentDidUpdate(): void;
|
|
1523
|
+
/**
|
|
1524
|
+
* @hidden
|
|
1525
|
+
*/
|
|
1526
|
+
componentWillUnmount(): void;
|
|
1527
|
+
/**
|
|
1528
|
+
* @hidden
|
|
1529
|
+
*/
|
|
1530
|
+
focus: () => void;
|
|
1531
|
+
/**
|
|
1532
|
+
* @hidden
|
|
1533
|
+
*/
|
|
1534
|
+
render(): JSX_2.Element;
|
|
1535
|
+
protected setCalendarRef: (calendar: any) => void;
|
|
1536
|
+
protected nextValue: (nextProps: DatePickerProps, nextState: DatePickerState) => Date | null;
|
|
1537
|
+
protected nextShow: (nextProps: DatePickerProps, nextState: DatePickerState) => boolean;
|
|
1538
|
+
protected setShow(show: boolean): void;
|
|
1539
|
+
protected mergeTime(value: Date | null): Date | null;
|
|
1540
|
+
protected nextTick(f: () => any): void;
|
|
1541
|
+
private renderPopup;
|
|
1542
|
+
private renderAdaptivePopup;
|
|
1543
|
+
private handleInputValueChange;
|
|
1544
|
+
private handleCalendarValueChange;
|
|
1545
|
+
private handleValueChange;
|
|
1546
|
+
private handleFocus;
|
|
1547
|
+
private handleBlur;
|
|
1548
|
+
private handleIconClick;
|
|
1549
|
+
private handleIconMouseDown;
|
|
1550
|
+
private handleKeyDown;
|
|
1551
|
+
private calculateMedia;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/** @hidden */
|
|
1555
|
+
export declare type DateRangePicker = DateRangePickerHandle;
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Represents the KendoReact DateRangePicker Component.
|
|
1559
|
+
*
|
|
1560
|
+
* Accepts properties of type [DateRangePickerProps]({% slug api_dateinputs_daterangepickerprops %}).
|
|
1561
|
+
* Obtaining the `ref` returns an object of type [DateRangePickerHandle]({% slug api_dateinputs_daterangepickerhandle %}).
|
|
1562
|
+
*/
|
|
1563
|
+
export declare const DateRangePicker: React_2.ForwardRefExoticComponent<DateRangePickerProps & React_2.RefAttributes<any>>;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Represents the settings that can be passed to the MultiViewCalendar inside the DateRangePicker.
|
|
1567
|
+
*/
|
|
1568
|
+
export declare interface DateRangePickerCalendarSettings extends MultiViewCalendarSettings {
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* The arguments for the `onChange` event of the DateRangePicker.
|
|
1573
|
+
*/
|
|
1574
|
+
export declare interface DateRangePickerChangeEvent {
|
|
1575
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
1576
|
+
nativeEvent?: any;
|
|
1577
|
+
value: SelectionRange;
|
|
1578
|
+
show?: boolean;
|
|
1579
|
+
target: DateRangePicker;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* The arguments for the `onClose` event of the DateRangePicker.
|
|
1584
|
+
*/
|
|
1585
|
+
export declare interface DateRangePickerCloseEvent {
|
|
1586
|
+
target: DateRangePicker;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Represents the settings that can be passed to the DateInput inside the DateRangePicker.
|
|
1591
|
+
*/
|
|
1592
|
+
export declare interface DateRangePickerDateInputSettings extends DateInputSettings {
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Represent the `ref` of the DateRangePicker component.
|
|
1597
|
+
*/
|
|
1598
|
+
export declare interface DateRangePickerHandle extends Pick<DateRangePickerWithoutContext, keyof DateRangePickerWithoutContext> {
|
|
1599
|
+
/**
|
|
1600
|
+
* Gets the MultiVieCalendar inside the DateRangePicker.
|
|
1601
|
+
*/
|
|
1602
|
+
calendar: MultiViewCalendar | null;
|
|
1603
|
+
/**
|
|
1604
|
+
* Returns the HTML element of the DateRangePicker component.
|
|
1605
|
+
*/
|
|
1606
|
+
element: HTMLSpanElement | null;
|
|
1607
|
+
/**
|
|
1608
|
+
* Gets the end DateInput component inside the DateRangePicker component.
|
|
1609
|
+
*/
|
|
1610
|
+
endDateInput: DateInput | null;
|
|
1611
|
+
/**
|
|
1612
|
+
* Gets the start DateInput component inside the DateRangePicker component.
|
|
1613
|
+
*/
|
|
1614
|
+
startDateInput: DateInput | null;
|
|
1615
|
+
/**
|
|
1616
|
+
* Gets the value of the DateRangePicker.
|
|
1617
|
+
*/
|
|
1618
|
+
value: SelectionRange;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* The arguments for the `onOpen` event of the DateRangePicker.
|
|
1623
|
+
*/
|
|
1624
|
+
export declare interface DateRangePickerOpenEvent {
|
|
1625
|
+
target: DateRangePicker;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* Represents the settings that can be passed to the Popup inside the DateRangePicker.
|
|
1630
|
+
*/
|
|
1631
|
+
export declare interface DateRangePickerPopupSettings extends PopupProps {
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* Represents the props of the [KendoReact DateRangePicker component]({% slug overview_daterangepicker %}).
|
|
1636
|
+
*/
|
|
1637
|
+
export declare interface DateRangePickerProps extends DateRangePickerSettings {
|
|
1638
|
+
/**
|
|
1639
|
+
* Overrides the validity state of the component.
|
|
1640
|
+
* If `valid` is set, the `required` property will be ignored.
|
|
1641
|
+
*
|
|
1642
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
1643
|
+
*/
|
|
1644
|
+
valid?: boolean;
|
|
1645
|
+
/**
|
|
1646
|
+
* Sets the default value of the DateRangePicker ([see example]({% slug default_value_daterangepicker %})).
|
|
1647
|
+
*/
|
|
1648
|
+
defaultValue?: SelectionRange;
|
|
1649
|
+
/**
|
|
1650
|
+
* Fires each time the user selects a part of a date range ([see example]({% slug controlled_daterangepicker %}#toc-controlling-the-value)).
|
|
1651
|
+
*/
|
|
1652
|
+
onChange?: (event: DateRangePickerChangeEvent) => void;
|
|
1653
|
+
/**
|
|
1654
|
+
* Fires each time the popup is opened.
|
|
1655
|
+
*/
|
|
1656
|
+
onOpen?: (event: DateRangePickerOpenEvent) => void;
|
|
1657
|
+
/**
|
|
1658
|
+
* Fires each time the popup is closed.
|
|
1659
|
+
*/
|
|
1660
|
+
onClose?: (event: DateRangePickerCloseEvent) => void;
|
|
1661
|
+
/**
|
|
1662
|
+
* Fires each time the popup of the DateRangePicker is about to cancel in ([adaptive mode]({% slug adaptive_rendering_daterangepicker %})).
|
|
1663
|
+
*/
|
|
1664
|
+
onCancel?: (event: React_2.MouseEvent<HTMLButtonElement>) => void;
|
|
1665
|
+
/**
|
|
1666
|
+
* Specifies the selected date range of the DateRangePicker ([see example]({% slug controlled_daterangepicker %}#toc-controlling-the-value)).
|
|
1667
|
+
*
|
|
1668
|
+
* > The `value` has to be an object with `start` and `end` valid JavaScript [`Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instances or `null`.
|
|
1669
|
+
*/
|
|
1670
|
+
value?: SelectionRange;
|
|
1671
|
+
/**
|
|
1672
|
+
* Providing different rendering of the popup element based on the screen dimensions.
|
|
1673
|
+
*/
|
|
1674
|
+
adaptive?: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* Specifies the text that is rendered as title in the adaptive popup.
|
|
1677
|
+
*/
|
|
1678
|
+
adaptiveTitle?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* @hidden
|
|
1681
|
+
*/
|
|
1682
|
+
dir?: string;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Represents the PropsContext of the `DateRangePicker` component.
|
|
1687
|
+
* Used for global configuration of all `DateRangePicker` instances.
|
|
1688
|
+
*
|
|
1689
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
1690
|
+
*/
|
|
1691
|
+
export declare const DateRangePickerPropsContext: React_2.Context<(p: DateRangePickerProps) => DateRangePickerProps>;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* @hidden
|
|
1695
|
+
*/
|
|
1696
|
+
export declare interface DateRangePickerSettings {
|
|
1697
|
+
/**
|
|
1698
|
+
* Enables the customization or the override of the default start DateInput which is rendered by the DateRangePicker
|
|
1699
|
+
* ([see example]({% slug custom_rendering_daterangepicker %}#toc-customizing-the-dateinputs)).
|
|
1700
|
+
*/
|
|
1701
|
+
startDateInput?: React.ComponentType<DateInputProps<any>>;
|
|
1702
|
+
/**
|
|
1703
|
+
* Enables the customization or the override of the default end DateInput which is rendered by the DateRangePicker
|
|
1704
|
+
* ([see example]({% slug custom_rendering_daterangepicker %}#toc-customizing-the-calendar)).
|
|
1705
|
+
*/
|
|
1706
|
+
endDateInput?: React.ComponentType<DateInputProps<any>>;
|
|
1707
|
+
/**
|
|
1708
|
+
* Enables the customization or the override of the default Popup which is rendered by the DateRangePicker
|
|
1709
|
+
* ([see example]({% slug custom_rendering_daterangepicker %}#toc-customizing-the-popup)).
|
|
1710
|
+
*/
|
|
1711
|
+
popup?: React.ComponentType<PopupProps>;
|
|
1712
|
+
/**
|
|
1713
|
+
* Enables the customization or the override of the default Calendar which is rendered by the DateRangePicker.
|
|
1714
|
+
*/
|
|
1715
|
+
calendar?: React.ComponentType<MultiViewCalendarProps<any>>;
|
|
1716
|
+
/**
|
|
1717
|
+
* If `allowReverse` is set to `true`, the component skips the validation of whether the `from` value is after the `to` value ([see example]({% slug reverse_daterangepicker %})).
|
|
1718
|
+
*
|
|
1719
|
+
* > If the [`calendarSettings`](#toc-calendarsettings) property is set, its `allowReverse` will take precedence.
|
|
1720
|
+
*/
|
|
1721
|
+
allowReverse?: boolean;
|
|
1722
|
+
/**
|
|
1723
|
+
* Represents the additional props that can be passed to the [MultiViewCalendar]({% slug overview_multiviewcalendar %}) inside the DateRangePicker ([see example]({% slug child_settings_daterangepicker %}#toc-configuring-the-multiviewcalendar)).
|
|
1724
|
+
*/
|
|
1725
|
+
calendarSettings?: DateRangePickerCalendarSettings;
|
|
1726
|
+
/**
|
|
1727
|
+
* Sets the `className` of the DateRangePicker.
|
|
1728
|
+
*/
|
|
1729
|
+
className?: string;
|
|
1730
|
+
/**
|
|
1731
|
+
* Sets the default state of the DateRangePicker upon render ([see example]({% slug default_value_daterangepicker %})).
|
|
1732
|
+
*/
|
|
1733
|
+
defaultShow?: boolean;
|
|
1734
|
+
/**
|
|
1735
|
+
* Determines whether the DateRangePicker is disabled ([see example]({% slug disabled_daterangepicker %})).
|
|
1736
|
+
*/
|
|
1737
|
+
disabled?: boolean;
|
|
1738
|
+
/**
|
|
1739
|
+
* Represents the additional props that can be passed to the end-date [DateInput]({% slug overview_dateinput %}) inside the DateRangePicker ([see example]({% slug child_settings_daterangepicker %}#toc-configuring-dateinputs)).
|
|
1740
|
+
*/
|
|
1741
|
+
endDateInputSettings?: DateRangePickerDateInputSettings;
|
|
1742
|
+
/**
|
|
1743
|
+
* Specifies the focused date of the DateRangePicker ([see example]({% slug focused_daterangepicker %})).
|
|
1744
|
+
*/
|
|
1745
|
+
focusedDate?: Date;
|
|
1746
|
+
/**
|
|
1747
|
+
* Specifies the `date` format which is used for formatting the value of the DateInput ([see example]({% slug formats_dateinput %})).
|
|
1748
|
+
*
|
|
1749
|
+
* > If [`startDateInputSettings`](#toc-startdateinputsettings) or [`endDateInputSettings`](#toc-enddateinputsettings) are set, their `format` will take precedence.
|
|
1750
|
+
*/
|
|
1751
|
+
format?: string | DateFormatOptions;
|
|
1752
|
+
/**
|
|
1753
|
+
* Specifies the `id` of the DateRangePicker.
|
|
1754
|
+
*/
|
|
1755
|
+
id?: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
1758
|
+
* For example these elements could contain error or hint message.
|
|
1759
|
+
*/
|
|
1760
|
+
ariaDescribedBy?: string;
|
|
1761
|
+
/**
|
|
1762
|
+
* Identifies the element(s) which will label the component.
|
|
1763
|
+
*/
|
|
1764
|
+
ariaLabelledBy?: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Specifies the greatest valid date ([see example]({% slug dateranges_daterangepicker %})).
|
|
1767
|
+
*/
|
|
1768
|
+
max?: Date;
|
|
1769
|
+
/**
|
|
1770
|
+
* Specifies the smallest valid date ([see example]({% slug dateranges_daterangepicker %})).
|
|
1771
|
+
*/
|
|
1772
|
+
min?: Date;
|
|
1773
|
+
/**
|
|
1774
|
+
* Fires each time any of the DateRangePicker elements gets blurred.
|
|
1775
|
+
*/
|
|
1776
|
+
onBlur?: (event: React.FocusEvent<any>) => void;
|
|
1777
|
+
/**
|
|
1778
|
+
* Fires each time the user focuses any of the DateRangePicker elements.
|
|
1779
|
+
*/
|
|
1780
|
+
onFocus?: (event: React.FocusEvent<any>) => void;
|
|
1781
|
+
/**
|
|
1782
|
+
* Represents the additional props that will be passed to the [Popup]({% slug overview_popup %}) inside the DateRangePicker ([see example]({% slug child_settings_daterangepicker %}#toc-configuring-the-popup)).
|
|
1783
|
+
*/
|
|
1784
|
+
popupSettings?: DateRangePickerPopupSettings;
|
|
1785
|
+
/**
|
|
1786
|
+
* Specifies if the calendar will be displayed ([see example]({% slug controlled_daterangepicker %}#toc-controlling-the-popup-state)).
|
|
1787
|
+
*/
|
|
1788
|
+
show?: boolean;
|
|
1789
|
+
/**
|
|
1790
|
+
* Represents the additional props that will be passed to the start-date [DateInput]({% slug overview_dateinput %}) inside the DateRangePicker ([see example]({% slug child_settings_daterangepicker %}#toc-configuring-dateinputs)).
|
|
1791
|
+
*/
|
|
1792
|
+
startDateInputSettings?: DateRangePickerDateInputSettings;
|
|
1793
|
+
/**
|
|
1794
|
+
* Specifies the additional styles that will be applied to the wrapping DateRangePicker element.
|
|
1795
|
+
*/
|
|
1796
|
+
style?: React.CSSProperties;
|
|
1797
|
+
/**
|
|
1798
|
+
* Determines whether the DateRangePicker will display a **Swap Value** button ([see example]({% slug reverse_daterangepicker %}#toc-swapping-start-and-end-dates-in-ranges)).
|
|
1799
|
+
*
|
|
1800
|
+
* > The DateRangePicker will display the swap button only if the [`allowReverse`](#toc-allowreverse) property is also set to `true`.
|
|
1801
|
+
*/
|
|
1802
|
+
swapButton?: boolean;
|
|
1803
|
+
/**
|
|
1804
|
+
* Sets the `tabIndex` property of the DatePicker.
|
|
1805
|
+
*/
|
|
1806
|
+
tabIndex?: number;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* @hidden
|
|
1811
|
+
*/
|
|
1812
|
+
declare interface DateRangePickerState {
|
|
1813
|
+
show: boolean;
|
|
1814
|
+
value: SelectionRange;
|
|
1815
|
+
windowWidth?: number;
|
|
1816
|
+
currentValue: SelectionRange;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/** @hidden */
|
|
1820
|
+
export declare class DateRangePickerWithoutContext extends React_2.Component<DateRangePickerProps, DateRangePickerState> {
|
|
1821
|
+
/**
|
|
1822
|
+
* @hidden
|
|
1823
|
+
*/
|
|
1824
|
+
static displayName: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* @hidden
|
|
1827
|
+
*/
|
|
1828
|
+
static propTypes: {
|
|
1829
|
+
allowReverse: PropTypes.Requireable<boolean>;
|
|
1830
|
+
calendarSettings: PropTypes.Requireable<any>;
|
|
1831
|
+
className: PropTypes.Requireable<string>;
|
|
1832
|
+
defaultShow: PropTypes.Requireable<boolean>;
|
|
1833
|
+
defaultValue: PropTypes.Validator<SelectionRange>;
|
|
1834
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
1835
|
+
endDateInputSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1836
|
+
value: PropTypes.Requireable<Date>;
|
|
1837
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
1838
|
+
skeleton: PropTypes.Requireable<string>;
|
|
1839
|
+
pattern: PropTypes.Requireable<string>;
|
|
1840
|
+
date: PropTypes.Requireable<string>;
|
|
1841
|
+
time: PropTypes.Requireable<string>;
|
|
1842
|
+
datetime: PropTypes.Requireable<string>;
|
|
1843
|
+
era: PropTypes.Requireable<string>;
|
|
1844
|
+
year: PropTypes.Requireable<string>;
|
|
1845
|
+
month: PropTypes.Requireable<string>;
|
|
1846
|
+
day: PropTypes.Requireable<string>;
|
|
1847
|
+
weekday: PropTypes.Requireable<string>;
|
|
1848
|
+
hour: PropTypes.Requireable<string>;
|
|
1849
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
1850
|
+
minute: PropTypes.Requireable<string>;
|
|
1851
|
+
second: PropTypes.Requireable<string>;
|
|
1852
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
1853
|
+
}> | null | undefined>>;
|
|
1854
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
1855
|
+
year: PropTypes.Requireable<string>;
|
|
1856
|
+
month: PropTypes.Requireable<string>;
|
|
1857
|
+
day: PropTypes.Requireable<string>;
|
|
1858
|
+
hour: PropTypes.Requireable<string>;
|
|
1859
|
+
minute: PropTypes.Requireable<string>;
|
|
1860
|
+
second: PropTypes.Requireable<string>;
|
|
1861
|
+
}> | null | undefined>>;
|
|
1862
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
1863
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
1864
|
+
title: PropTypes.Requireable<string>;
|
|
1865
|
+
steps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1866
|
+
year: PropTypes.Requireable<number>;
|
|
1867
|
+
month: PropTypes.Requireable<number>;
|
|
1868
|
+
day: PropTypes.Requireable<number>;
|
|
1869
|
+
hour: PropTypes.Requireable<number>;
|
|
1870
|
+
minute: PropTypes.Requireable<number>;
|
|
1871
|
+
second: PropTypes.Requireable<number>;
|
|
1872
|
+
}>>;
|
|
1873
|
+
min: PropTypes.Requireable<Date>;
|
|
1874
|
+
max: PropTypes.Requireable<Date>;
|
|
1875
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
1876
|
+
spinners: PropTypes.Requireable<boolean>;
|
|
1877
|
+
name: PropTypes.Requireable<string>;
|
|
1878
|
+
dir: PropTypes.Requireable<string>;
|
|
1879
|
+
label: PropTypes.Requireable<string>;
|
|
1880
|
+
id: PropTypes.Requireable<string>;
|
|
1881
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
1882
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
1883
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
1884
|
+
ariaRole: PropTypes.Requireable<string>;
|
|
1885
|
+
ariaHasPopup: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
1886
|
+
ariaExpanded: PropTypes.Requireable<NonNullable<boolean | null | undefined>>;
|
|
1887
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1888
|
+
validationMessage: PropTypes.Requireable<string>;
|
|
1889
|
+
required: PropTypes.Requireable<boolean>;
|
|
1890
|
+
validate: PropTypes.Requireable<boolean>;
|
|
1891
|
+
valid: PropTypes.Requireable<boolean>;
|
|
1892
|
+
size: PropTypes.Requireable<"small" | "large" | "medium" | null | undefined>;
|
|
1893
|
+
rounded: PropTypes.Requireable<"small" | "large" | "medium" | "full" | null | undefined>;
|
|
1894
|
+
fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | null | undefined>;
|
|
1895
|
+
}>>;
|
|
1896
|
+
focusedDate: PropTypes.Requireable<Date>;
|
|
1897
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
1898
|
+
skeleton: PropTypes.Requireable<string>;
|
|
1899
|
+
pattern: PropTypes.Requireable<string>;
|
|
1900
|
+
date: PropTypes.Requireable<string>;
|
|
1901
|
+
time: PropTypes.Requireable<string>;
|
|
1902
|
+
datetime: PropTypes.Requireable<string>;
|
|
1903
|
+
era: PropTypes.Requireable<string>;
|
|
1904
|
+
year: PropTypes.Requireable<string>;
|
|
1905
|
+
month: PropTypes.Requireable<string>;
|
|
1906
|
+
day: PropTypes.Requireable<string>;
|
|
1907
|
+
weekday: PropTypes.Requireable<string>;
|
|
1908
|
+
hour: PropTypes.Requireable<string>;
|
|
1909
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
1910
|
+
minute: PropTypes.Requireable<string>;
|
|
1911
|
+
second: PropTypes.Requireable<string>;
|
|
1912
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
1913
|
+
}> | null | undefined>>;
|
|
1914
|
+
id: PropTypes.Requireable<string>;
|
|
1915
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
1916
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
1917
|
+
max: PropTypes.Requireable<Date>;
|
|
1918
|
+
min: PropTypes.Requireable<Date>;
|
|
1919
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1920
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1921
|
+
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1922
|
+
popupSettings: PropTypes.Requireable<any>;
|
|
1923
|
+
show: PropTypes.Requireable<boolean>;
|
|
1924
|
+
startDateInputSettings: PropTypes.Requireable<any>;
|
|
1925
|
+
style: PropTypes.Requireable<any>;
|
|
1926
|
+
swapButton: PropTypes.Requireable<any>;
|
|
1927
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
1928
|
+
dir: PropTypes.Requireable<string>;
|
|
1929
|
+
value: PropTypes.Validator<SelectionRange>;
|
|
1930
|
+
};
|
|
1931
|
+
/**
|
|
1932
|
+
* @hidden
|
|
1933
|
+
*/
|
|
1934
|
+
static defaultProps: {
|
|
1935
|
+
allowReverse: boolean;
|
|
1936
|
+
defaultShow: boolean;
|
|
1937
|
+
defaultValue: SelectionRange;
|
|
1938
|
+
disabled: boolean;
|
|
1939
|
+
format: string;
|
|
1940
|
+
max: Date;
|
|
1941
|
+
min: Date;
|
|
1942
|
+
swapButton: boolean;
|
|
1943
|
+
};
|
|
1944
|
+
private _element;
|
|
1945
|
+
private _calendar;
|
|
1946
|
+
private _startDateInput;
|
|
1947
|
+
private _endDateInput;
|
|
1948
|
+
private valueDuringOnChange?;
|
|
1949
|
+
private showDuringOnChange?;
|
|
1950
|
+
private nextTickId;
|
|
1951
|
+
private get _popupId();
|
|
1952
|
+
private get _startInputId();
|
|
1953
|
+
private get _endInputId();
|
|
1954
|
+
private shouldFocusDateInput;
|
|
1955
|
+
private shouldFocusCalendar;
|
|
1956
|
+
private observerResize?;
|
|
1957
|
+
constructor(props: DateRangePickerProps);
|
|
1958
|
+
/**
|
|
1959
|
+
* Gets the wrapping element of the DateRangePicker.
|
|
1960
|
+
*/
|
|
1961
|
+
get element(): HTMLSpanElement | null;
|
|
1962
|
+
/**
|
|
1963
|
+
* Gets the start DateInput component inside the DatePicker component.
|
|
1964
|
+
*/
|
|
1965
|
+
get startDateInput(): DateInput | null;
|
|
1966
|
+
/**
|
|
1967
|
+
* Gets the end DateInput component inside the DatePicker component.
|
|
1968
|
+
*/
|
|
1969
|
+
get endDateInput(): DateInput | null;
|
|
1970
|
+
/**
|
|
1971
|
+
* Gets the MultiVieCalendar inside the DateRangePicker.
|
|
1972
|
+
*/
|
|
1973
|
+
get calendar(): MultiViewCalendar | null;
|
|
1974
|
+
/**
|
|
1975
|
+
* Gets the value of the DateRangePicker.
|
|
1976
|
+
*/
|
|
1977
|
+
get value(): SelectionRange;
|
|
1978
|
+
/**
|
|
1979
|
+
* Gets the popup state of the DateRangePicker.
|
|
1980
|
+
*/
|
|
1981
|
+
get show(): boolean;
|
|
1982
|
+
protected get min(): Date;
|
|
1983
|
+
protected get max(): Date;
|
|
1984
|
+
private get document();
|
|
1985
|
+
private get localizationService();
|
|
1986
|
+
/**
|
|
1987
|
+
* The mobile mode of the DateRangePicker.
|
|
1988
|
+
*/
|
|
1989
|
+
get mobileMode(): boolean;
|
|
1990
|
+
/**
|
|
1991
|
+
* @hidden
|
|
1992
|
+
*/
|
|
1993
|
+
componentDidMount(): void;
|
|
1994
|
+
/**
|
|
1995
|
+
* @hidden
|
|
1996
|
+
*/
|
|
1997
|
+
componentDidUpdate(): void;
|
|
1998
|
+
/**
|
|
1999
|
+
* @hidden
|
|
2000
|
+
*/
|
|
2001
|
+
componentWillUnmount(): void;
|
|
2002
|
+
/**
|
|
2003
|
+
* @hidden
|
|
2004
|
+
*/
|
|
2005
|
+
focus: () => void;
|
|
2006
|
+
/**
|
|
2007
|
+
* @hidden
|
|
2008
|
+
*/
|
|
2009
|
+
render(): JSX_2.Element;
|
|
2010
|
+
protected setCalendarRef: (calendar: MultiViewCalendarHandle | null) => void;
|
|
2011
|
+
protected focusCalendarElement: () => void;
|
|
2012
|
+
protected focusDateInputElement(): void;
|
|
2013
|
+
protected calculateValue: (props: DateRangePickerProps, state: DateRangePickerState) => SelectionRange;
|
|
2014
|
+
protected calculateShow: (nextProps: DateRangePickerProps, nextState: DateRangePickerState) => boolean;
|
|
2015
|
+
protected nextTick(f: () => any): void;
|
|
2016
|
+
protected setShow(show: boolean): void;
|
|
2017
|
+
private renderCalendar;
|
|
2018
|
+
private renderPopup;
|
|
2019
|
+
private renderAdaptivePopup;
|
|
2020
|
+
private handleReverseClick;
|
|
2021
|
+
private handleReverseMouseDown;
|
|
2022
|
+
private handleFocus;
|
|
2023
|
+
private handleClick;
|
|
2024
|
+
private handleBlur;
|
|
2025
|
+
private handleCancel;
|
|
2026
|
+
private handleEndChange;
|
|
2027
|
+
private handleStartChange;
|
|
2028
|
+
private extractRangeFromValue;
|
|
2029
|
+
private handleCalendarChange;
|
|
2030
|
+
private handleKeyDown;
|
|
2031
|
+
private handleChange;
|
|
2032
|
+
private calculateMedia;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
/** @hidden */
|
|
2036
|
+
export declare type DateTimePicker = DateTimePickerHandle;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* Represents the KendoReact DateTimePicker Component.
|
|
2040
|
+
*
|
|
2041
|
+
* Accepts properties of type [DateTimePickerProps]({% slug api_dateinputs_datetimepickerprops %}).
|
|
2042
|
+
* Obtaining the `ref` returns an object of type [DateTimePickerHandle]({% slug api_dateinputs_datetimepickerhandle %}).
|
|
2043
|
+
*/
|
|
2044
|
+
export declare const DateTimePicker: React_2.ForwardRefExoticComponent<DateTimePickerProps & React_2.RefAttributes<any>>;
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* The arguments for the `onChange` event of the DateTimePicker.
|
|
2048
|
+
*/
|
|
2049
|
+
export declare interface DateTimePickerChangeEvent {
|
|
2050
|
+
nativeEvent: any;
|
|
2051
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
2052
|
+
value: Date | null;
|
|
2053
|
+
show: boolean;
|
|
2054
|
+
target: DateTimePicker;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* The arguments for the `onClose` event of the DateTimePicker.
|
|
2059
|
+
*/
|
|
2060
|
+
export declare interface DateTimePickerCloseEvent {
|
|
2061
|
+
target: DateTimePicker;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* Represent the `ref` of the DateTimePicker component.
|
|
2066
|
+
*/
|
|
2067
|
+
export declare interface DateTimePickerHandle extends Pick<DateTimePickerWithoutContext, keyof DateTimePickerWithoutContext> {
|
|
2068
|
+
/**
|
|
2069
|
+
* Gets the DateInput component inside the DateTimePicker component.
|
|
2070
|
+
*/
|
|
2071
|
+
dateInput: DateInput | null;
|
|
2072
|
+
/**
|
|
2073
|
+
* Returns the HTML element of the DateTimePicker component.
|
|
2074
|
+
*/
|
|
2075
|
+
element: HTMLSpanElement | null;
|
|
2076
|
+
/**
|
|
2077
|
+
* Gets the `name` property of the DateTimePicker.
|
|
2078
|
+
*/
|
|
2079
|
+
name: string | undefined;
|
|
2080
|
+
/**
|
|
2081
|
+
* Gets the popup state of the DateTimePicker.
|
|
2082
|
+
*/
|
|
2083
|
+
show: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* Represents the validity state into which the DateTimePicker is set.
|
|
2086
|
+
*/
|
|
2087
|
+
validity: FormComponentValidity;
|
|
2088
|
+
/**
|
|
2089
|
+
* Gets the value of the DateTimePicker.
|
|
2090
|
+
*/
|
|
2091
|
+
value: Date | null;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* The arguments for the `onOpen` event of the DateTimePicker.
|
|
2096
|
+
*/
|
|
2097
|
+
export declare interface DateTimePickerOpenEvent {
|
|
2098
|
+
target: DateTimePicker;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Represents the props of the [KendoReact DateTimePicker component]({% slug overview_datetimepicker %}).
|
|
2103
|
+
*/
|
|
2104
|
+
export declare interface DateTimePickerProps extends DateTimePickerSettings, FormComponentProps {
|
|
2105
|
+
/**
|
|
2106
|
+
* Sets the default value of the DateTimePicker
|
|
2107
|
+
* ([see example]({% slug default_value_datetimepicker %})).
|
|
2108
|
+
* For more information, refer to the article on
|
|
2109
|
+
* [uncontrolled components in React](https://reactjs.org/docs/uncontrolled-components.html).
|
|
2110
|
+
*/
|
|
2111
|
+
defaultValue?: Date | null;
|
|
2112
|
+
/**
|
|
2113
|
+
* Fires each time the user selects a new value
|
|
2114
|
+
* ([see example]({% slug controlled_datetimepicker %}#toc-controlling-the-date-value)).
|
|
2115
|
+
*/
|
|
2116
|
+
onChange?: (event: DateTimePickerChangeEvent) => void;
|
|
2117
|
+
/**
|
|
2118
|
+
* Fires each time the popup is opened.
|
|
2119
|
+
*/
|
|
2120
|
+
onOpen?: (event: DateTimePickerOpenEvent) => void;
|
|
2121
|
+
/**
|
|
2122
|
+
* Fires each time the popup is closed.
|
|
2123
|
+
*/
|
|
2124
|
+
onClose?: (event: DateTimePickerCloseEvent) => void;
|
|
2125
|
+
/**
|
|
2126
|
+
* Specifies the value of the DateTimePicker
|
|
2127
|
+
* ([see example]({% slug controlled_datetimepicker %}#toc-controlling-the-date-value)).
|
|
2128
|
+
*
|
|
2129
|
+
* > The `value` has to be a valid
|
|
2130
|
+
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
|
|
2131
|
+
*/
|
|
2132
|
+
value?: Date | null;
|
|
2133
|
+
/**
|
|
2134
|
+
* Configures the `size` of the DateTimePicker.
|
|
2135
|
+
*
|
|
2136
|
+
* The available options are:
|
|
2137
|
+
* - small
|
|
2138
|
+
* - medium
|
|
2139
|
+
* - large
|
|
2140
|
+
* - null—Does not set a size `className`.
|
|
2141
|
+
*
|
|
2142
|
+
* @default `medium`
|
|
2143
|
+
*/
|
|
2144
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
2145
|
+
/**
|
|
2146
|
+
* Configures the `roundness` of the DateTimePicker.
|
|
2147
|
+
*
|
|
2148
|
+
* The available options are:
|
|
2149
|
+
* - small
|
|
2150
|
+
* - medium
|
|
2151
|
+
* - large
|
|
2152
|
+
* - full
|
|
2153
|
+
* - null—Does not set a rounded `className`.
|
|
2154
|
+
*
|
|
2155
|
+
* @default `medium`
|
|
2156
|
+
*/
|
|
2157
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
2158
|
+
/**
|
|
2159
|
+
* Configures the `fillMode` of the DateTimePicker.
|
|
2160
|
+
*
|
|
2161
|
+
* The available options are:
|
|
2162
|
+
* - solid
|
|
2163
|
+
* - outline
|
|
2164
|
+
* - flat
|
|
2165
|
+
* - null—Does not set a fillMode `className`.
|
|
2166
|
+
*
|
|
2167
|
+
* @default `solid`
|
|
2168
|
+
*/
|
|
2169
|
+
fillMode?: null | 'solid' | 'flat' | 'outline';
|
|
2170
|
+
/**
|
|
2171
|
+
* Providing different rendering of the popup element based on the screen dimensions.
|
|
2172
|
+
*/
|
|
2173
|
+
adaptive?: boolean;
|
|
2174
|
+
/**
|
|
2175
|
+
* Specifies the text that is rendered as title in the adaptive popup.
|
|
2176
|
+
*/
|
|
2177
|
+
adaptiveTitle?: string;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Represents the PropsContext of the `DateTimePicker` component.
|
|
2182
|
+
* Used for global configuration of all `DateTimePicker` instances.
|
|
2183
|
+
*
|
|
2184
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
2185
|
+
*/
|
|
2186
|
+
export declare const DateTimePickerPropsContext: React_2.Context<(p: DateTimePickerProps) => DateTimePickerProps>;
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* @hidden
|
|
2190
|
+
*/
|
|
2191
|
+
export declare interface DateTimePickerSettings {
|
|
2192
|
+
/**
|
|
2193
|
+
* Enables the customization or the override of the default Calendar which is rendered by the DateTimePicker
|
|
2194
|
+
* ([see example]({% slug custom_rendering_datetimepicker %}#toc-customizing-the-calendar)).
|
|
2195
|
+
*/
|
|
2196
|
+
calendar?: React.ComponentType<CalendarProps>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Enables the customization or the override of the default Popup which is rendered by the DateTimePicker
|
|
2199
|
+
* ([see example]({% slug custom_rendering_datetimepicker %}#toc-customizing-the-popup)).
|
|
2200
|
+
*/
|
|
2201
|
+
popup?: React.ComponentType<PopupProps>;
|
|
2202
|
+
/**
|
|
2203
|
+
* Enables the customization or the override of the default DateInput which is rendered by the DateTimePicker
|
|
2204
|
+
* ([see example]({% slug custom_rendering_datetimepicker %}#toc-customizing-the-dateinput)).
|
|
2205
|
+
*/
|
|
2206
|
+
dateInput?: React.ComponentType<DateInputProps>;
|
|
2207
|
+
/**
|
|
2208
|
+
* Sets the `className` of the DateTimePicker.
|
|
2209
|
+
*/
|
|
2210
|
+
className?: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* Sets if the calendar popup is opened upon initial render.
|
|
2213
|
+
* For more information, refer to the article on
|
|
2214
|
+
* [uncontrolled components in React](https://reactjs.org/docs/uncontrolled-components.html).
|
|
2215
|
+
*/
|
|
2216
|
+
defaultShow?: boolean;
|
|
2217
|
+
/**
|
|
2218
|
+
* Specifies the incremental steps of the `DateInput` and the internal `TimePart` ([see examples]({% slug incrementalsteps_datetimepicker %})).
|
|
2219
|
+
*
|
|
2220
|
+
* The available options are:
|
|
2221
|
+
* - `year: Number`—Controls the incremental step of the year value.
|
|
2222
|
+
* - `month: Number`—Controls the incremental step of the month value.
|
|
2223
|
+
* - `day: Number`—Controls the incremental step of the day value.
|
|
2224
|
+
* - `hour: Number`—Controls the incremental step of the hour value.
|
|
2225
|
+
* - `minute: Number`—Controls the incremental step of the minute value.
|
|
2226
|
+
* - `second: Number`—Controls the incremental step of the second value.
|
|
2227
|
+
*/
|
|
2228
|
+
steps?: DateInputIncrementalSteps;
|
|
2229
|
+
/**
|
|
2230
|
+
* Determines whether the DateTimePicker is disabled
|
|
2231
|
+
* ([see example]({% slug disabled_datetimepicker %})).
|
|
2232
|
+
*/
|
|
2233
|
+
disabled?: boolean;
|
|
2234
|
+
/**
|
|
2235
|
+
* Specifies the initial focusedDate of the Calendar inside the DateTimePicker
|
|
2236
|
+
* ([see example]({% slug dates_datetimepicker %})).
|
|
2237
|
+
*/
|
|
2238
|
+
focusedDate?: Date;
|
|
2239
|
+
/**
|
|
2240
|
+
* Specifies the date format that is used to display the input value
|
|
2241
|
+
* ([see example]({% slug formats_datetimepicker %})).
|
|
2242
|
+
*/
|
|
2243
|
+
format?: string | DateFormatOptions;
|
|
2244
|
+
/**
|
|
2245
|
+
* Defines the descriptions of the format sections in the input field
|
|
2246
|
+
* ([more information and examples]({% slug placeholders_datetimepicker %})).
|
|
2247
|
+
*/
|
|
2248
|
+
formatPlaceholder?: DateInputFormatPlaceholder;
|
|
2249
|
+
/**
|
|
2250
|
+
* Specifies the `id` of the DateTimePicker.
|
|
2251
|
+
*/
|
|
2252
|
+
id?: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
2255
|
+
* For example these elements could contain error or hint message.
|
|
2256
|
+
*/
|
|
2257
|
+
ariaDescribedBy?: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* Identifies the element(s) which will label the component.
|
|
2260
|
+
*/
|
|
2261
|
+
ariaLabelledBy?: string;
|
|
2262
|
+
/**
|
|
2263
|
+
* Specifies the greatest valid date
|
|
2264
|
+
* ([see example]({% slug dateranges_datetimepicker %})).
|
|
2265
|
+
*/
|
|
2266
|
+
max?: Date;
|
|
2267
|
+
/**
|
|
2268
|
+
* Specifies the smallest valid date
|
|
2269
|
+
* ([see example]({% slug dateranges_datetimepicker %})).
|
|
2270
|
+
*/
|
|
2271
|
+
min?: Date;
|
|
2272
|
+
minTime?: Date;
|
|
2273
|
+
maxTime?: Date;
|
|
2274
|
+
/**
|
|
2275
|
+
* Specifies the `name` property of the `input` DOM element.
|
|
2276
|
+
*/
|
|
2277
|
+
name?: string;
|
|
2278
|
+
/**
|
|
2279
|
+
* Fires each time any of the DateTimePicker elements gets blurred.
|
|
2280
|
+
*/
|
|
2281
|
+
onBlur?: (event: React.FocusEvent<HTMLSpanElement | HTMLDivElement>) => void;
|
|
2282
|
+
/**
|
|
2283
|
+
* Fires each time the user focuses any of the DateTimePicker elements.
|
|
2284
|
+
*/
|
|
2285
|
+
onFocus?: (event: React.FocusEvent<HTMLSpanElement | HTMLDivElement>) => void;
|
|
2286
|
+
/**
|
|
2287
|
+
* Specifies if the popup will be displayed
|
|
2288
|
+
* ([see example]({% slug controlled_datetimepicker %}#toc-controlling-the-popup-state)).
|
|
2289
|
+
*/
|
|
2290
|
+
show?: boolean;
|
|
2291
|
+
/**
|
|
2292
|
+
* Sets the `tabIndex` property of the DateTimePicker.
|
|
2293
|
+
*/
|
|
2294
|
+
tabIndex?: number;
|
|
2295
|
+
/**
|
|
2296
|
+
* Sets the title of the `input` element of the DateTimePicker.
|
|
2297
|
+
*/
|
|
2298
|
+
title?: string;
|
|
2299
|
+
/**
|
|
2300
|
+
* Determines whether to display a week number column of the Calendar inside the DateTimePicker
|
|
2301
|
+
* ([see example]({% slug weeksnumbers_calendar %})).
|
|
2302
|
+
*/
|
|
2303
|
+
weekNumber?: boolean;
|
|
2304
|
+
/**
|
|
2305
|
+
* Specifies the width of the DateTimePicker.
|
|
2306
|
+
*/
|
|
2307
|
+
width?: number | string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Determines whether to display the **Cancel** button in the popup.
|
|
2310
|
+
*/
|
|
2311
|
+
cancelButton?: boolean;
|
|
2312
|
+
/**
|
|
2313
|
+
* Renders a floating label for the DateTimePicker.
|
|
2314
|
+
*/
|
|
2315
|
+
label?: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* Specifies the hint the DateInput displays when its value is `null` or there is no partial selection.
|
|
2318
|
+
* For more information, refer to the article on
|
|
2319
|
+
* [placeholders]({% slug placeholders_datetimepicker %}).
|
|
2320
|
+
*/
|
|
2321
|
+
placeholder?: string | null;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* @hidden
|
|
2326
|
+
*/
|
|
2327
|
+
declare interface DateTimePickerState {
|
|
2328
|
+
value: Date | null;
|
|
2329
|
+
show: boolean;
|
|
2330
|
+
focused: boolean;
|
|
2331
|
+
windowWidth?: number;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
/** @hidden */
|
|
2335
|
+
export declare class DateTimePickerWithoutContext extends React_2.Component<DateTimePickerProps, DateTimePickerState> implements FormComponent {
|
|
2336
|
+
/**
|
|
2337
|
+
* @hidden
|
|
2338
|
+
*/
|
|
2339
|
+
static displayName: string;
|
|
2340
|
+
/**
|
|
2341
|
+
* @hidden
|
|
2342
|
+
*/
|
|
2343
|
+
static propTypes: {
|
|
2344
|
+
className: PropTypes.Requireable<string>;
|
|
2345
|
+
defaultShow: PropTypes.Requireable<boolean>;
|
|
2346
|
+
defaultValue: PropTypes.Requireable<Date>;
|
|
2347
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
2348
|
+
focusedDate: PropTypes.Requireable<Date>;
|
|
2349
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
2350
|
+
skeleton: PropTypes.Requireable<string>;
|
|
2351
|
+
pattern: PropTypes.Requireable<string>;
|
|
2352
|
+
date: PropTypes.Requireable<string>;
|
|
2353
|
+
time: PropTypes.Requireable<string>;
|
|
2354
|
+
datetime: PropTypes.Requireable<string>;
|
|
2355
|
+
era: PropTypes.Requireable<string>;
|
|
2356
|
+
year: PropTypes.Requireable<string>;
|
|
2357
|
+
month: PropTypes.Requireable<string>;
|
|
2358
|
+
day: PropTypes.Requireable<string>;
|
|
2359
|
+
weekday: PropTypes.Requireable<string>;
|
|
2360
|
+
hour: PropTypes.Requireable<string>;
|
|
2361
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
2362
|
+
minute: PropTypes.Requireable<string>;
|
|
2363
|
+
second: PropTypes.Requireable<string>;
|
|
2364
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
2365
|
+
}> | null | undefined>>;
|
|
2366
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
2367
|
+
year: PropTypes.Requireable<string>;
|
|
2368
|
+
month: PropTypes.Requireable<string>;
|
|
2369
|
+
day: PropTypes.Requireable<string>;
|
|
2370
|
+
hour: PropTypes.Requireable<string>;
|
|
2371
|
+
minute: PropTypes.Requireable<string>;
|
|
2372
|
+
second: PropTypes.Requireable<string>;
|
|
2373
|
+
}> | null | undefined>>;
|
|
2374
|
+
id: PropTypes.Requireable<string>;
|
|
2375
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
2376
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
2377
|
+
min: PropTypes.Requireable<Date>;
|
|
2378
|
+
max: PropTypes.Requireable<Date>;
|
|
2379
|
+
name: PropTypes.Requireable<string>;
|
|
2380
|
+
popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
2381
|
+
animate: PropTypes.Requireable<boolean>;
|
|
2382
|
+
appendTo: PropTypes.Requireable<any>;
|
|
2383
|
+
popupClass: PropTypes.Requireable<string>;
|
|
2384
|
+
}>>;
|
|
2385
|
+
show: PropTypes.Requireable<boolean>;
|
|
2386
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
2387
|
+
title: PropTypes.Requireable<string>;
|
|
2388
|
+
value: PropTypes.Requireable<Date>;
|
|
2389
|
+
weekNumber: PropTypes.Requireable<boolean>;
|
|
2390
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
2391
|
+
validationMessage: PropTypes.Requireable<string>;
|
|
2392
|
+
required: PropTypes.Requireable<boolean>;
|
|
2393
|
+
validate: PropTypes.Requireable<boolean>;
|
|
2394
|
+
valid: PropTypes.Requireable<boolean>;
|
|
2395
|
+
cancelButton: PropTypes.Requireable<boolean>;
|
|
2396
|
+
size: PropTypes.Requireable<"small" | "large" | "medium" | null | undefined>;
|
|
2397
|
+
rounded: PropTypes.Requireable<"small" | "large" | "medium" | "full" | null | undefined>;
|
|
2398
|
+
fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | null | undefined>;
|
|
2399
|
+
};
|
|
2400
|
+
/**
|
|
2401
|
+
* @hidden
|
|
2402
|
+
*/
|
|
2403
|
+
static defaultProps: {
|
|
2404
|
+
defaultShow: boolean;
|
|
2405
|
+
defaultValue: null;
|
|
2406
|
+
disabled: boolean;
|
|
2407
|
+
format: string;
|
|
2408
|
+
max: Date;
|
|
2409
|
+
min: Date;
|
|
2410
|
+
popupSettings: {};
|
|
2411
|
+
tabIndex: number;
|
|
2412
|
+
weekNumber: boolean;
|
|
2413
|
+
required: boolean;
|
|
2414
|
+
validityStyles: boolean;
|
|
2415
|
+
cancelButton: boolean;
|
|
2416
|
+
dateInput: React_2.ComponentType<DateInputProps<any>>;
|
|
2417
|
+
size: "small" | "large" | "medium" | null | undefined;
|
|
2418
|
+
rounded: "small" | "large" | "medium" | "full" | null | undefined;
|
|
2419
|
+
fillMode: "flat" | "solid" | "outline" | null | undefined;
|
|
2420
|
+
};
|
|
2421
|
+
/**
|
|
2422
|
+
* @hidden
|
|
2423
|
+
*/
|
|
2424
|
+
readonly state: DateTimePickerState;
|
|
2425
|
+
private get _popupId();
|
|
2426
|
+
private _element;
|
|
2427
|
+
private _dateInput;
|
|
2428
|
+
private _dateTimeSelector;
|
|
2429
|
+
private valueDuringOnChange?;
|
|
2430
|
+
private showDuringOnChange?;
|
|
2431
|
+
private nextTickId;
|
|
2432
|
+
private shouldFocusDateInput;
|
|
2433
|
+
private prevShow;
|
|
2434
|
+
private observerResize?;
|
|
2435
|
+
private get document();
|
|
2436
|
+
constructor(props: DateTimePickerProps);
|
|
2437
|
+
/**
|
|
2438
|
+
* Gets the wrapping element of the DateTimePicker.
|
|
2439
|
+
*/
|
|
2440
|
+
get element(): HTMLSpanElement | null;
|
|
2441
|
+
/**
|
|
2442
|
+
* Gets the DateInput component inside the DateTimePicker component.
|
|
2443
|
+
*/
|
|
2444
|
+
get dateInput(): DateInput | null;
|
|
2445
|
+
/**
|
|
2446
|
+
* Gets the value of the DateTimePicker.
|
|
2447
|
+
*/
|
|
2448
|
+
get value(): Date | null;
|
|
2449
|
+
/**
|
|
2450
|
+
* Gets the popup state of the DateTimePicker.
|
|
2451
|
+
*/
|
|
2452
|
+
get show(): boolean;
|
|
2453
|
+
/**
|
|
2454
|
+
* Gets the `name` property of the DateTimePicker.
|
|
2455
|
+
*/
|
|
2456
|
+
get name(): string | undefined;
|
|
2457
|
+
/**
|
|
2458
|
+
* The mobile mode of the ComboBox.
|
|
2459
|
+
*/
|
|
2460
|
+
get mobileMode(): boolean;
|
|
2461
|
+
protected get min(): Date;
|
|
2462
|
+
protected get max(): Date;
|
|
2463
|
+
/**
|
|
2464
|
+
* Represents the validity state into which the DateTimePicker is set.
|
|
2465
|
+
*/
|
|
2466
|
+
get validity(): FormComponentValidity;
|
|
2467
|
+
/**
|
|
2468
|
+
* @hidden
|
|
2469
|
+
*/
|
|
2470
|
+
protected get validityStyles(): boolean;
|
|
2471
|
+
/**
|
|
2472
|
+
* @hidden
|
|
2473
|
+
*/
|
|
2474
|
+
protected get required(): boolean;
|
|
2475
|
+
/**
|
|
2476
|
+
* @hidden
|
|
2477
|
+
*/
|
|
2478
|
+
protected get dateInputComp(): React_2.ComponentType<DateInputProps<any>>;
|
|
2479
|
+
/**
|
|
2480
|
+
* @hidden
|
|
2481
|
+
*/
|
|
2482
|
+
componentDidMount(): void;
|
|
2483
|
+
/**
|
|
2484
|
+
* @hidden
|
|
2485
|
+
*/
|
|
2486
|
+
componentDidUpdate(): void;
|
|
2487
|
+
/**
|
|
2488
|
+
* @hidden
|
|
2489
|
+
*/
|
|
2490
|
+
componentWillUnmount(): void;
|
|
2491
|
+
/**
|
|
2492
|
+
* @hidden
|
|
2493
|
+
*/
|
|
2494
|
+
focus: () => void;
|
|
2495
|
+
/**
|
|
2496
|
+
* @hidden
|
|
2497
|
+
*/
|
|
2498
|
+
render(): JSX_2.Element;
|
|
2499
|
+
private renderPicker;
|
|
2500
|
+
private renderAdaptivePopup;
|
|
2501
|
+
protected setShow(show: boolean): void;
|
|
2502
|
+
protected nextTick(f: () => any): void;
|
|
2503
|
+
private handleReject;
|
|
2504
|
+
private handleValueChange;
|
|
2505
|
+
private handleFocus;
|
|
2506
|
+
private handleBlur;
|
|
2507
|
+
private handleDateIconClick;
|
|
2508
|
+
private handleIconMouseDown;
|
|
2509
|
+
private handleKeyDown;
|
|
2510
|
+
private dateInputElement;
|
|
2511
|
+
private calculateMedia;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* @hidden
|
|
2516
|
+
*/
|
|
2517
|
+
export declare class DayPeriodService implements ListService {
|
|
2518
|
+
private intl;
|
|
2519
|
+
private min;
|
|
2520
|
+
private max;
|
|
2521
|
+
private part;
|
|
2522
|
+
constructor(intl: IntlService);
|
|
2523
|
+
/**
|
|
2524
|
+
* @hidden
|
|
2525
|
+
*/
|
|
2526
|
+
apply(value: Date, candidate: Date): Date;
|
|
2527
|
+
/**
|
|
2528
|
+
* @hidden
|
|
2529
|
+
*/
|
|
2530
|
+
configure(settings: ListServiceSettings): void;
|
|
2531
|
+
/**
|
|
2532
|
+
* @hidden
|
|
2533
|
+
*/
|
|
2534
|
+
data(_?: Date): ListItem[];
|
|
2535
|
+
/**
|
|
2536
|
+
* @hidden
|
|
2537
|
+
*/
|
|
2538
|
+
isRangeChanged(_: Date, __: Date): boolean;
|
|
2539
|
+
/**
|
|
2540
|
+
* @hidden
|
|
2541
|
+
*/
|
|
2542
|
+
limitRange(min: Date, max: Date, _?: Date): Date[];
|
|
2543
|
+
/**
|
|
2544
|
+
* @hidden
|
|
2545
|
+
*/
|
|
2546
|
+
total(): number;
|
|
2547
|
+
/**
|
|
2548
|
+
* @hidden
|
|
2549
|
+
*/
|
|
2550
|
+
selectedIndex(value: Date): number;
|
|
2551
|
+
/**
|
|
2552
|
+
* @hidden
|
|
2553
|
+
*/
|
|
2554
|
+
valueInList(value: Date): boolean;
|
|
2555
|
+
private normalizedRange;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* @hidden
|
|
2560
|
+
*/
|
|
2561
|
+
export declare class DecadeViewService implements ViewService {
|
|
2562
|
+
addToDate(min: Date, skip: number): Date;
|
|
2563
|
+
datesList(start: Date, count: number): Date[];
|
|
2564
|
+
data(options: any): CellContext[][];
|
|
2565
|
+
isSelectedFromArray(candidate: Date, dates: Date[], min: Date, max: Date): boolean;
|
|
2566
|
+
isEqual(candidate: Date | null, expected: Date | null): boolean;
|
|
2567
|
+
isInArray(date: Date, dates: Date[]): boolean;
|
|
2568
|
+
isInRange(candidate: Date, min: Date, max: Date): boolean;
|
|
2569
|
+
isRangeStart(value: Date): boolean;
|
|
2570
|
+
isInSameView(candidate: Date, value: Date): boolean;
|
|
2571
|
+
move(value: Date, action: Action): Date;
|
|
2572
|
+
cellTitle(value: Date): string;
|
|
2573
|
+
navigationTitle(value?: Date): string;
|
|
2574
|
+
title(value?: Date): string;
|
|
2575
|
+
rowLength(_?: boolean): number;
|
|
2576
|
+
skip(value: Date, min: Date): number;
|
|
2577
|
+
total(min: Date, max: Date): number;
|
|
2578
|
+
value(current: Date): string;
|
|
2579
|
+
viewDate(date: Date, max: Date, border?: number): Date;
|
|
2580
|
+
private normalize;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* @hidden
|
|
2585
|
+
*/
|
|
2586
|
+
export declare const decreaseValue = "dateinput.decrement";
|
|
2587
|
+
|
|
2588
|
+
/**
|
|
2589
|
+
* @hidden
|
|
2590
|
+
*/
|
|
2591
|
+
declare type Direction = 'horizontal' | 'vertical';
|
|
2592
|
+
|
|
2593
|
+
/**
|
|
2594
|
+
* @hidden
|
|
2595
|
+
*/
|
|
2596
|
+
declare enum Direction_2 {
|
|
2597
|
+
Left = 0,
|
|
2598
|
+
Right = 1
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* @hidden
|
|
2603
|
+
*/
|
|
2604
|
+
export declare class DOMService {
|
|
2605
|
+
calendarHeight: number;
|
|
2606
|
+
headerHeight: number;
|
|
2607
|
+
monthViewHeight: number;
|
|
2608
|
+
yearViewHeight: number;
|
|
2609
|
+
decadeViewHeight: number;
|
|
2610
|
+
centuryViewHeight: number;
|
|
2611
|
+
navigationItemHeight: number;
|
|
2612
|
+
scrollableContentHeight: number;
|
|
2613
|
+
scrollableYearContentHeight: number;
|
|
2614
|
+
calendarWidth: number;
|
|
2615
|
+
monthViewWidth: number;
|
|
2616
|
+
yearViewWidth: number;
|
|
2617
|
+
decadeViewWidth: number;
|
|
2618
|
+
centuryViewWidth: number;
|
|
2619
|
+
scrollableContentWidth: number;
|
|
2620
|
+
didCalculate: boolean;
|
|
2621
|
+
private hostContainer;
|
|
2622
|
+
ensureHeights(): void;
|
|
2623
|
+
calculateHeights(container?: HTMLElement): void;
|
|
2624
|
+
viewHeight(viewType: CalendarViewEnum): number;
|
|
2625
|
+
viewWidth(viewType: CalendarViewEnum): number;
|
|
2626
|
+
private viewDimension;
|
|
2627
|
+
private batch;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* @hidden
|
|
2632
|
+
*/
|
|
2633
|
+
declare class DOMService_2 {
|
|
2634
|
+
itemHeight: number;
|
|
2635
|
+
timeListHeight: number;
|
|
2636
|
+
didCalculate: boolean;
|
|
2637
|
+
ensureHeights(): void;
|
|
2638
|
+
calculateHeights(container?: HTMLElement): void;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* @hidden
|
|
2643
|
+
*/
|
|
2644
|
+
export declare const EMPTY_SELECTIONRANGE: SelectionRange;
|
|
2645
|
+
|
|
2646
|
+
/**
|
|
2647
|
+
* @hidden
|
|
2648
|
+
*/
|
|
2649
|
+
export declare const end = "daterangepicker.end";
|
|
2650
|
+
|
|
2651
|
+
export { FormComponentValidity }
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* @hidden
|
|
2655
|
+
*/
|
|
2656
|
+
export declare const getNow: () => Date;
|
|
2657
|
+
|
|
2658
|
+
/**
|
|
2659
|
+
* @hidden
|
|
2660
|
+
*/
|
|
2661
|
+
export declare const getToday: () => Date;
|
|
2662
|
+
|
|
2663
|
+
/**
|
|
2664
|
+
* @hidden
|
|
2665
|
+
*/
|
|
2666
|
+
export declare class Header extends React_2.Component<HeaderProps> {
|
|
2667
|
+
static propTypes: {
|
|
2668
|
+
activeView: PropTypes.Validator<number>;
|
|
2669
|
+
currentDate: PropTypes.Validator<Date>;
|
|
2670
|
+
max: PropTypes.Validator<Date>;
|
|
2671
|
+
min: PropTypes.Validator<Date>;
|
|
2672
|
+
rangeLength: PropTypes.Requireable<number>;
|
|
2673
|
+
};
|
|
2674
|
+
static defaultProps: {
|
|
2675
|
+
rangeLength: number;
|
|
2676
|
+
min: Date;
|
|
2677
|
+
max: Date;
|
|
2678
|
+
};
|
|
2679
|
+
protected get min(): Date;
|
|
2680
|
+
protected get max(): Date;
|
|
2681
|
+
protected get rangeLength(): number;
|
|
2682
|
+
protected get canMoveUp(): boolean;
|
|
2683
|
+
render(): JSX_2.Element;
|
|
2684
|
+
protected getTitle: () => string;
|
|
2685
|
+
private handleTitleClick;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* @hidden
|
|
2690
|
+
*/
|
|
2691
|
+
declare interface HeaderEventArguments {
|
|
2692
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
2693
|
+
nativeEvent?: any;
|
|
2694
|
+
value: Date;
|
|
2695
|
+
target: Header;
|
|
2696
|
+
isTodayClick?: boolean;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
/**
|
|
2700
|
+
* @hidden
|
|
2701
|
+
*/
|
|
2702
|
+
declare interface HeaderProps {
|
|
2703
|
+
activeView: CalendarViewEnum;
|
|
2704
|
+
bus: BusViewService;
|
|
2705
|
+
currentDate: Date;
|
|
2706
|
+
max?: Date;
|
|
2707
|
+
min?: Date;
|
|
2708
|
+
rangeLength?: number;
|
|
2709
|
+
service: ViewService;
|
|
2710
|
+
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2711
|
+
commands?: React_2.ReactNode;
|
|
2712
|
+
verticalView?: boolean;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* @hidden
|
|
2717
|
+
*/
|
|
2718
|
+
export declare class HorizontalViewList extends React_2.Component<HorizontalViewListProps, {}> {
|
|
2719
|
+
static defaultProps: {
|
|
2720
|
+
showWeekNumbers: boolean;
|
|
2721
|
+
views: number;
|
|
2722
|
+
take: number;
|
|
2723
|
+
allowReverse: boolean;
|
|
2724
|
+
min: Date;
|
|
2725
|
+
max: Date;
|
|
2726
|
+
};
|
|
2727
|
+
private _element;
|
|
2728
|
+
private isActive;
|
|
2729
|
+
get element(): HTMLDivElement | null;
|
|
2730
|
+
protected get weekNumber(): boolean;
|
|
2731
|
+
protected get min(): Date;
|
|
2732
|
+
protected get max(): Date;
|
|
2733
|
+
constructor(props: HorizontalViewListProps);
|
|
2734
|
+
focusActiveDate: () => void;
|
|
2735
|
+
blurActiveDate: () => void;
|
|
2736
|
+
componentDidUpdate(): void;
|
|
2737
|
+
render(): JSX_2.Element;
|
|
2738
|
+
protected rotateSelectionRange: (selectionRange: SelectionRange) => SelectionRange;
|
|
2739
|
+
private handleDateChange;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* @hidden
|
|
2744
|
+
*/
|
|
2745
|
+
declare interface HorizontalViewListEventArguments {
|
|
2746
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
2747
|
+
nativeEvent?: any;
|
|
2748
|
+
value: Date;
|
|
2749
|
+
target: HorizontalViewList;
|
|
2750
|
+
isTodayClick: boolean;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* @hidden
|
|
2755
|
+
*/
|
|
2756
|
+
export declare interface HorizontalViewListProps {
|
|
2757
|
+
activeView: CalendarViewEnum;
|
|
2758
|
+
bus: BusViewService;
|
|
2759
|
+
cellUID: string;
|
|
2760
|
+
focusedDate: Date;
|
|
2761
|
+
max?: Date;
|
|
2762
|
+
min?: Date;
|
|
2763
|
+
onChange?: (event: HorizontalViewListEventArguments) => void;
|
|
2764
|
+
selectionRange: SelectionRange;
|
|
2765
|
+
service: ViewService;
|
|
2766
|
+
showWeekNumbers?: boolean;
|
|
2767
|
+
take?: number;
|
|
2768
|
+
value: Date[] | Date | null;
|
|
2769
|
+
views?: number;
|
|
2770
|
+
onCellEnter?: (value: Date) => void;
|
|
2771
|
+
allowReverse?: boolean;
|
|
2772
|
+
cell?: React_2.ComponentType<CalendarCellProps>;
|
|
2773
|
+
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
2774
|
+
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
2775
|
+
dates: any[];
|
|
2776
|
+
verticalView?: boolean;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
/**
|
|
2780
|
+
* @hidden
|
|
2781
|
+
*/
|
|
2782
|
+
export declare class HoursService implements ListService {
|
|
2783
|
+
private intl;
|
|
2784
|
+
private boundRange;
|
|
2785
|
+
private insertUndividedMax;
|
|
2786
|
+
private min;
|
|
2787
|
+
private max;
|
|
2788
|
+
private step;
|
|
2789
|
+
private toListItem;
|
|
2790
|
+
constructor(intl: IntlService);
|
|
2791
|
+
apply(value: Date, candidate: Date): Date;
|
|
2792
|
+
configure(settings: ListServiceSettings): void;
|
|
2793
|
+
data(selectedValue?: Date): ListItem[];
|
|
2794
|
+
isRangeChanged(min: Date, max: Date): boolean;
|
|
2795
|
+
limitRange(min: Date, max: Date, value?: Date): Date[];
|
|
2796
|
+
total(value?: Date): number;
|
|
2797
|
+
selectedIndex(value: Date): number;
|
|
2798
|
+
valueInList(value?: Date): boolean;
|
|
2799
|
+
private addLast;
|
|
2800
|
+
private addMissing;
|
|
2801
|
+
private countFromMin;
|
|
2802
|
+
private isMissing;
|
|
2803
|
+
private isLastMissing;
|
|
2804
|
+
private divideByStep;
|
|
2805
|
+
private lastHour;
|
|
2806
|
+
private range;
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
/**
|
|
2810
|
+
* @hidden
|
|
2811
|
+
*/
|
|
2812
|
+
export declare const increaseValue = "dateinput.increment";
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* @hidden
|
|
2816
|
+
*/
|
|
2817
|
+
declare interface ListItem {
|
|
2818
|
+
text: string;
|
|
2819
|
+
value: Date;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
/**
|
|
2823
|
+
* @hidden
|
|
2824
|
+
*/
|
|
2825
|
+
declare interface ListService {
|
|
2826
|
+
apply(value: Date, candidate: Date): Date;
|
|
2827
|
+
configure(settings: ListServiceSettings): void;
|
|
2828
|
+
data(value?: Date): ListItem[];
|
|
2829
|
+
isRangeChanged(min: Date, max: Date): boolean;
|
|
2830
|
+
limitRange(min: Date, max: Date, value?: Date): Date[];
|
|
2831
|
+
total(value?: Date): number;
|
|
2832
|
+
selectedIndex(value: Date): number;
|
|
2833
|
+
valueInList(value: Date): boolean;
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
/**
|
|
2837
|
+
* @hidden
|
|
2838
|
+
*/
|
|
2839
|
+
declare interface ListServiceSettings {
|
|
2840
|
+
boundRange: boolean;
|
|
2841
|
+
insertUndividedMax: boolean;
|
|
2842
|
+
min: Date;
|
|
2843
|
+
max: Date;
|
|
2844
|
+
part: DateFormatPart;
|
|
2845
|
+
step: number;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* @hidden
|
|
2850
|
+
*/
|
|
2851
|
+
export declare const MAX_DATE: Date;
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* @hidden
|
|
2855
|
+
*/
|
|
2856
|
+
export declare const MAX_TIME: Date;
|
|
2857
|
+
|
|
2858
|
+
/**
|
|
2859
|
+
* @hidden
|
|
2860
|
+
*/
|
|
2861
|
+
export declare const MIN_DATE: Date;
|
|
2862
|
+
|
|
2863
|
+
/**
|
|
2864
|
+
* @hidden
|
|
2865
|
+
*/
|
|
2866
|
+
export declare const MIN_TIME: Date;
|
|
2867
|
+
|
|
2868
|
+
/**
|
|
2869
|
+
* @hidden
|
|
2870
|
+
*/
|
|
2871
|
+
export declare class MinutesService implements ListService {
|
|
2872
|
+
private intl;
|
|
2873
|
+
private toListItem;
|
|
2874
|
+
private min;
|
|
2875
|
+
private max;
|
|
2876
|
+
private step;
|
|
2877
|
+
private insertUndividedMax;
|
|
2878
|
+
constructor(intl: IntlService);
|
|
2879
|
+
apply(value: Date, candidate: Date): Date;
|
|
2880
|
+
configure(settings: ListServiceSettings): void;
|
|
2881
|
+
data(selectedValue?: Date): ListItem[];
|
|
2882
|
+
isRangeChanged(min: Date, max: Date): boolean;
|
|
2883
|
+
limitRange(min: Date, max: Date, value?: Date): Date[];
|
|
2884
|
+
total(value?: Date): number;
|
|
2885
|
+
selectedIndex(value: Date): number;
|
|
2886
|
+
valueInList(value: Date): boolean;
|
|
2887
|
+
private addLast;
|
|
2888
|
+
private addMissing;
|
|
2889
|
+
private countFromMin;
|
|
2890
|
+
private isMissing;
|
|
2891
|
+
private isLastMissing;
|
|
2892
|
+
private divideByStep;
|
|
2893
|
+
private lastMinute;
|
|
2894
|
+
private range;
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
/**
|
|
2898
|
+
* @hidden
|
|
2899
|
+
*/
|
|
2900
|
+
export declare class MonthViewService implements ViewService {
|
|
2901
|
+
private intl;
|
|
2902
|
+
constructor(intl: IntlService);
|
|
2903
|
+
addToDate(min: Date, skip: number): Date;
|
|
2904
|
+
datesList(start: Date, count: number): Date[];
|
|
2905
|
+
data(options: any): CellContext[][];
|
|
2906
|
+
isEqual(candidate: Date | null, expected: Date | null): boolean;
|
|
2907
|
+
isSelectedFromArray(candidate: Date, dates: Date[], min: Date, max: Date): boolean;
|
|
2908
|
+
isInArray(date: Date, dates: Date[]): boolean;
|
|
2909
|
+
isInRange(candidate: Date, min: Date, max: Date): boolean;
|
|
2910
|
+
isInSameView(candidate: Date, value: Date): boolean;
|
|
2911
|
+
isRangeStart(value: Date): boolean;
|
|
2912
|
+
move(value: Date, action: Action): Date;
|
|
2913
|
+
cellTitle(value: Date): string;
|
|
2914
|
+
navigationTitle(value?: Date): string;
|
|
2915
|
+
title(current: Date): string;
|
|
2916
|
+
rowLength(prependCell?: boolean): number;
|
|
2917
|
+
skip(value: Date, min: Date): number;
|
|
2918
|
+
total(min: Date, max: Date): number;
|
|
2919
|
+
value(current: Date): string;
|
|
2920
|
+
viewDate(date: Date, max: Date, border?: number): Date;
|
|
2921
|
+
isWeekend(date: Date): boolean;
|
|
2922
|
+
private abbrMonthNames;
|
|
2923
|
+
private normalize;
|
|
2924
|
+
private wideMonthNames;
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
/** @hidden */
|
|
2928
|
+
export declare type MultiViewCalendar = MultiViewCalendarHandle;
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* Represents the KendoReact MultiViewCalendar Component.
|
|
2932
|
+
*
|
|
2933
|
+
* Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
|
|
2934
|
+
* Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
|
|
2935
|
+
*/
|
|
2936
|
+
export declare const MultiViewCalendar: React_2.ForwardRefExoticComponent<MultiViewCalendarProps<any> & React_2.RefAttributes<any>>;
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* The arguments for the `onChange` event of the MultiViewCalendar. * The generic argument sets the target type of the event. Defaults to `MultiViewCalendar`.
|
|
2940
|
+
*/
|
|
2941
|
+
export declare interface MultiViewCalendarChangeEvent<T = MultiViewCalendar> {
|
|
2942
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
2943
|
+
nativeEvent?: any;
|
|
2944
|
+
value: Date | Date[] | SelectionRange | null;
|
|
2945
|
+
target: T;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Represent the `ref` of the MultiViewCalendar component.
|
|
2950
|
+
*/
|
|
2951
|
+
export declare interface MultiViewCalendarHandle extends Pick<MultiViewCalendarWithoutContext, keyof MultiViewCalendarWithoutContext> {
|
|
2952
|
+
/**
|
|
2953
|
+
* Returns the HTML element of the MultiViewCalendar component.
|
|
2954
|
+
*/
|
|
2955
|
+
element: HTMLDivElement | null;
|
|
2956
|
+
/**
|
|
2957
|
+
* Gets the current focused date of the MultiViewCalendar.
|
|
2958
|
+
*/
|
|
2959
|
+
focusedDate: Date;
|
|
2960
|
+
/**
|
|
2961
|
+
* Gets the value of the MultiViewCalendar.
|
|
2962
|
+
*/
|
|
2963
|
+
value: Date | Date[] | SelectionRange | null;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
/**
|
|
2967
|
+
* Represents the selection modes of the MultiViewCalendar.
|
|
2968
|
+
*
|
|
2969
|
+
* The supported modes are:
|
|
2970
|
+
* * (Default) `single`—Renders a single-date selection.
|
|
2971
|
+
* * `multiple`—Renders a multiple-date selection.
|
|
2972
|
+
* * `range`—Renders a date-range selection.
|
|
2973
|
+
*/
|
|
2974
|
+
export declare type MultiViewCalendarMode = 'single' | 'multiple' | 'range';
|
|
2975
|
+
|
|
2976
|
+
/**
|
|
2977
|
+
* Represents the props of the [KendoReact MultiViewCalendar component]({% slug overview_multiviewcalendar %}). The generic argument is passed to the `onChange` property and is used as a target in the [`MultiViewCalendarChangeEvent`]({% slug api_dateinputs_multiviewcalendarchangeevent %}) interface.
|
|
2978
|
+
*/
|
|
2979
|
+
export declare interface MultiViewCalendarProps<T = any> extends MultiViewCalendarSettings {
|
|
2980
|
+
/** @hidden */
|
|
2981
|
+
_ref?: (instance: {
|
|
2982
|
+
element: HTMLDivElement | null;
|
|
2983
|
+
}) => void;
|
|
2984
|
+
/**
|
|
2985
|
+
* Sets the default value of the MultiViewCalendar.
|
|
2986
|
+
*/
|
|
2987
|
+
defaultValue?: Date | Date[] | SelectionRange | null;
|
|
2988
|
+
/**
|
|
2989
|
+
* An event that is called after the value of the MultiViewCalendar has changed. The new value is generated based on the current `mode` of the MultiViewCalendar.
|
|
2990
|
+
*/
|
|
2991
|
+
onChange?: (event: MultiViewCalendarChangeEvent<T>) => void;
|
|
2992
|
+
/**
|
|
2993
|
+
* Sets the value of the MultiViewCalendar. Based on the value type, the MultiViewcalendar renders a single, multiple, or range selection.
|
|
2994
|
+
*/
|
|
2995
|
+
value?: Date | Date[] | SelectionRange | null;
|
|
2996
|
+
/** @hidden */
|
|
2997
|
+
mobileMode?: boolean;
|
|
2998
|
+
/**
|
|
2999
|
+
* @hidden
|
|
3000
|
+
*/
|
|
3001
|
+
dir?: string;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* Represents the PropsContext of the `MultiViewCalendar` component.
|
|
3006
|
+
* Used for global configuration of all `MultiViewCalendar` instances.
|
|
3007
|
+
*
|
|
3008
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
3009
|
+
*/
|
|
3010
|
+
export declare const MultiViewCalendarPropsContext: React_2.Context<(p: MultiViewCalendarProps<any>) => MultiViewCalendarProps<any>>;
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* @hidden
|
|
3014
|
+
*/
|
|
3015
|
+
export declare interface MultiViewCalendarSettings {
|
|
3016
|
+
/**
|
|
3017
|
+
* Specifies which end of the defined selection range will be marked as active.
|
|
3018
|
+
*
|
|
3019
|
+
* > If the selection range is undefined, the value is ignored.
|
|
3020
|
+
*/
|
|
3021
|
+
activeRangeEnd?: SelectionRangeEnd;
|
|
3022
|
+
/**
|
|
3023
|
+
* If set to `true`, the component skips the validation of whether the `from` value is after the `to` value.
|
|
3024
|
+
*/
|
|
3025
|
+
allowReverse?: boolean;
|
|
3026
|
+
/**
|
|
3027
|
+
* Defines the bottommost view to which the user can navigate.
|
|
3028
|
+
*/
|
|
3029
|
+
bottomView?: ActiveView;
|
|
3030
|
+
/**
|
|
3031
|
+
* Sets the `className` of the MultiViewCalendar.
|
|
3032
|
+
*/
|
|
3033
|
+
className?: string;
|
|
3034
|
+
/**
|
|
3035
|
+
* Sets the default active view of the MultiViewCalendar.
|
|
3036
|
+
* If not set, the MultiViewCalendar displays the month view.
|
|
3037
|
+
*/
|
|
3038
|
+
defaultActiveView?: ActiveView;
|
|
3039
|
+
/**
|
|
3040
|
+
* Sets the `views` property of the MultiViewCalendar and defines the number of rendered views.
|
|
3041
|
+
*/
|
|
3042
|
+
views?: number;
|
|
3043
|
+
/**
|
|
3044
|
+
* Determines if the week number column will be displayed.
|
|
3045
|
+
*/
|
|
3046
|
+
weekNumber?: boolean;
|
|
3047
|
+
/**
|
|
3048
|
+
* Fires each time the MultiViewCalendar is focused.
|
|
3049
|
+
*/
|
|
3050
|
+
onFocus?: (event: React.FocusEvent<any>) => void;
|
|
3051
|
+
/**
|
|
3052
|
+
* Sets the `tabIndex` property of the MultiViewCalendar.
|
|
3053
|
+
*/
|
|
3054
|
+
tabIndex?: number;
|
|
3055
|
+
/**
|
|
3056
|
+
* Defines the topmost view to which the user can navigate.
|
|
3057
|
+
*/
|
|
3058
|
+
topView?: ActiveView;
|
|
3059
|
+
/**
|
|
3060
|
+
* Determines whether the MultiViewCalendar is disabled.
|
|
3061
|
+
*/
|
|
3062
|
+
disabled?: boolean;
|
|
3063
|
+
/**
|
|
3064
|
+
* Sets the initial focused date of the MultiViewCalendar.
|
|
3065
|
+
*/
|
|
3066
|
+
focusedDate?: Date;
|
|
3067
|
+
/**
|
|
3068
|
+
* Sets the `id` of the MultiViewCalendar.
|
|
3069
|
+
*/
|
|
3070
|
+
id?: string;
|
|
3071
|
+
/**
|
|
3072
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
3073
|
+
* For example these elements could contain error or hint message.
|
|
3074
|
+
*/
|
|
3075
|
+
ariaDescribedBy?: string;
|
|
3076
|
+
/**
|
|
3077
|
+
* Identifies the element(s) which will label the component.
|
|
3078
|
+
*/
|
|
3079
|
+
ariaLabelledBy?: string;
|
|
3080
|
+
/**
|
|
3081
|
+
* Sets the maximum allowed date of the MultiViewCalendar. Defaults to `2099-12-31`.
|
|
3082
|
+
*/
|
|
3083
|
+
max?: Date;
|
|
3084
|
+
/**
|
|
3085
|
+
* Sets the minimum allowed date of the MultiViewCalendar. Defaults to `1900-1-1`.
|
|
3086
|
+
*/
|
|
3087
|
+
min?: Date;
|
|
3088
|
+
/**
|
|
3089
|
+
* Sets the selection mode of the MultiViewCalendar.
|
|
3090
|
+
*
|
|
3091
|
+
* The available modes are:
|
|
3092
|
+
* * (Default) `single`—Renders a single-date selection.
|
|
3093
|
+
* * `multiple`—Renders a multiple-date selection.
|
|
3094
|
+
* * `range`—Renders a date-range selection.
|
|
3095
|
+
*/
|
|
3096
|
+
mode?: MultiViewCalendarMode;
|
|
3097
|
+
/**
|
|
3098
|
+
* Fires each time the MultiViewCalendar is blurred.
|
|
3099
|
+
*/
|
|
3100
|
+
onBlur?: (event: React.FocusEvent<any>) => void;
|
|
3101
|
+
/**
|
|
3102
|
+
* Enables the customization or the override of the default MultiViewCalendar cell
|
|
3103
|
+
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-view)).
|
|
3104
|
+
*/
|
|
3105
|
+
cell?: React.ComponentType<CalendarCellProps>;
|
|
3106
|
+
/**
|
|
3107
|
+
* Enables the customization or the override of the default week cell in the MultiViewCalendar
|
|
3108
|
+
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-week-column)).
|
|
3109
|
+
*/
|
|
3110
|
+
weekCell?: React.ComponentType<CalendarWeekCellProps>;
|
|
3111
|
+
/**
|
|
3112
|
+
* Enables the customization or the override of the default header title in the MultiViewCalendar
|
|
3113
|
+
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-titles-of-current-views)).
|
|
3114
|
+
*/
|
|
3115
|
+
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
/**
|
|
3119
|
+
* @hidden
|
|
3120
|
+
*/
|
|
3121
|
+
declare interface MultiViewCalendarState {
|
|
3122
|
+
value: Date | Date[] | SelectionRange | null;
|
|
3123
|
+
activeView: CalendarViewEnum;
|
|
3124
|
+
focusedDate: Date;
|
|
3125
|
+
navigateDate: Date;
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
/** @hidden */
|
|
3129
|
+
export declare class MultiViewCalendarWithoutContext extends React_2.Component<MultiViewCalendarProps, MultiViewCalendarState> {
|
|
3130
|
+
/**
|
|
3131
|
+
* @hidden
|
|
3132
|
+
*/
|
|
3133
|
+
static displayName: string;
|
|
3134
|
+
/**
|
|
3135
|
+
* @hidden
|
|
3136
|
+
*/
|
|
3137
|
+
static propTypes: {
|
|
3138
|
+
activeRangeEnd: PropTypes.Requireable<"end" | "start">;
|
|
3139
|
+
allowReverse: PropTypes.Requireable<boolean>;
|
|
3140
|
+
bottomView: PropTypes.Requireable<ActiveView>;
|
|
3141
|
+
className: PropTypes.Requireable<string>;
|
|
3142
|
+
defaultActiveView: PropTypes.Requireable<ActiveView>;
|
|
3143
|
+
defaultValue: PropTypes.Requireable<any>;
|
|
3144
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
3145
|
+
focusedDate: PropTypes.Requireable<Date>;
|
|
3146
|
+
id: PropTypes.Requireable<string>;
|
|
3147
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
3148
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
3149
|
+
max: PropTypes.Requireable<Date>;
|
|
3150
|
+
min: PropTypes.Requireable<Date>;
|
|
3151
|
+
mode: PropTypes.Requireable<"range" | "multiple" | "single">;
|
|
3152
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
3153
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
3154
|
+
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
3155
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
3156
|
+
topView: PropTypes.Requireable<ActiveView>;
|
|
3157
|
+
value: PropTypes.Requireable<any>;
|
|
3158
|
+
views: (props: MultiViewCalendarProps, propName: keyof MultiViewCalendarProps<any>, componentName: string) => Error | null;
|
|
3159
|
+
weekNumber: PropTypes.Requireable<boolean>;
|
|
3160
|
+
dir: PropTypes.Requireable<string>;
|
|
3161
|
+
};
|
|
3162
|
+
/**
|
|
3163
|
+
* @hidden
|
|
3164
|
+
*/
|
|
3165
|
+
static defaultProps: {
|
|
3166
|
+
disabled: boolean;
|
|
3167
|
+
min: Date;
|
|
3168
|
+
max: Date;
|
|
3169
|
+
navigation: boolean;
|
|
3170
|
+
defaultActiveView: ActiveView;
|
|
3171
|
+
defaultValue: null;
|
|
3172
|
+
topView: ActiveView;
|
|
3173
|
+
tabIndex: number;
|
|
3174
|
+
bottomView: ActiveView;
|
|
3175
|
+
views: number;
|
|
3176
|
+
allowReverse: boolean;
|
|
3177
|
+
};
|
|
3178
|
+
protected dates: any[];
|
|
3179
|
+
private lastView;
|
|
3180
|
+
private lastViewsCount;
|
|
3181
|
+
protected selectedDate: Date | null;
|
|
3182
|
+
protected selectedMultiple: Date[] | null;
|
|
3183
|
+
protected selectedRange: SelectionRange;
|
|
3184
|
+
protected _focusedDate: Date;
|
|
3185
|
+
protected cellUID: string | undefined;
|
|
3186
|
+
private valueDuringOnChange?;
|
|
3187
|
+
private activeRangeEnd;
|
|
3188
|
+
private _element;
|
|
3189
|
+
private bus;
|
|
3190
|
+
private navigation;
|
|
3191
|
+
private intl;
|
|
3192
|
+
private localization;
|
|
3193
|
+
private service;
|
|
3194
|
+
private get wrapperID();
|
|
3195
|
+
private calendarViewList;
|
|
3196
|
+
private isActive;
|
|
3197
|
+
private calculateFocusFromValue;
|
|
3198
|
+
private get isRtl();
|
|
3199
|
+
/**
|
|
3200
|
+
* Gets the wrapping element of the MultiViewCalendar component.
|
|
3201
|
+
*/
|
|
3202
|
+
get element(): HTMLDivElement | null;
|
|
3203
|
+
/**
|
|
3204
|
+
* Gets the value of the MultiViewCalendar.
|
|
3205
|
+
*/
|
|
3206
|
+
get value(): Date | Date[] | SelectionRange | null;
|
|
3207
|
+
/**
|
|
3208
|
+
* Gets the current focused date of the MultiViewCalendar.
|
|
3209
|
+
*/
|
|
3210
|
+
get focusedDate(): Date;
|
|
3211
|
+
protected get min(): Date;
|
|
3212
|
+
protected get max(): Date;
|
|
3213
|
+
protected get bottomView(): CalendarViewEnum;
|
|
3214
|
+
protected get topView(): CalendarViewEnum;
|
|
3215
|
+
protected get activeRange(): SelectionRangeEnd;
|
|
3216
|
+
protected get todayIsInRange(): boolean;
|
|
3217
|
+
constructor(props: MultiViewCalendarProps);
|
|
3218
|
+
/**
|
|
3219
|
+
* @hidden
|
|
3220
|
+
*/
|
|
3221
|
+
componentDidMount(): void;
|
|
3222
|
+
/**
|
|
3223
|
+
* @hidden
|
|
3224
|
+
*/
|
|
3225
|
+
componentDidUpdate(): void;
|
|
3226
|
+
/**
|
|
3227
|
+
* @hidden
|
|
3228
|
+
*/
|
|
3229
|
+
focus: () => void;
|
|
3230
|
+
/**
|
|
3231
|
+
* @hidden
|
|
3232
|
+
*/
|
|
3233
|
+
render(): JSX_2.Element;
|
|
3234
|
+
protected clampRange: (value: Date) => SelectionRange;
|
|
3235
|
+
protected rangeWithFocused: (range: SelectionRange, focusedDate: Date) => SelectionRange;
|
|
3236
|
+
protected generateRange: (candidate: Date, value: SelectionRange) => SelectionRange;
|
|
3237
|
+
protected canNavigate: (action: Action) => boolean;
|
|
3238
|
+
protected isInMonth(date: Date, month: Date): boolean;
|
|
3239
|
+
protected navigate: (action: Action, date: Date) => void;
|
|
3240
|
+
protected move: (action: Action, date: Date) => Date;
|
|
3241
|
+
protected clampDate: (value: Date) => Date;
|
|
3242
|
+
protected shouldAutoCorrect: (candidate: Date, value: SelectionRange) => boolean;
|
|
3243
|
+
private handleCellEnter;
|
|
3244
|
+
private handleMouseDown;
|
|
3245
|
+
private handleClick;
|
|
3246
|
+
private handleFocus;
|
|
3247
|
+
private handleBlur;
|
|
3248
|
+
private handleTodayClick;
|
|
3249
|
+
private handlePrevButtonClick;
|
|
3250
|
+
private handleNextButtonClick;
|
|
3251
|
+
private handleKeyDown;
|
|
3252
|
+
private handleViewChange;
|
|
3253
|
+
private handleDateChange;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
/**
|
|
3257
|
+
* @hidden
|
|
3258
|
+
*/
|
|
3259
|
+
export declare class NavigationService {
|
|
3260
|
+
private bus;
|
|
3261
|
+
constructor(bus: BusViewService);
|
|
3262
|
+
action(event: React_2.KeyboardEvent<any>): Action;
|
|
3263
|
+
move(value: Date, action: Action, activeView: CalendarViewEnum, service: ViewService, event?: React_2.SyntheticEvent<any>): Date;
|
|
3264
|
+
}
|
|
3265
|
+
|
|
3266
|
+
/**
|
|
3267
|
+
* @hidden
|
|
3268
|
+
*/
|
|
3269
|
+
declare class PageAction {
|
|
3270
|
+
skip: number;
|
|
3271
|
+
constructor(skip: number);
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* @hidden
|
|
3276
|
+
* @deprecated
|
|
3277
|
+
*/
|
|
3278
|
+
export declare const PickerWrap: React_2.ForwardRefExoticComponent<PickerWrapProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
3279
|
+
|
|
3280
|
+
/**
|
|
3281
|
+
* @hidden
|
|
3282
|
+
* @deprecated
|
|
3283
|
+
*/
|
|
3284
|
+
export declare interface PickerWrapProps {
|
|
3285
|
+
_ref?: React_2.Ref<HTMLSpanElement | null>;
|
|
3286
|
+
id?: string;
|
|
3287
|
+
tabIndex?: number;
|
|
3288
|
+
className?: string;
|
|
3289
|
+
children?: React_2.ReactNode;
|
|
3290
|
+
style?: React_2.CSSProperties;
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
/**
|
|
3294
|
+
* @hidden
|
|
3295
|
+
*/
|
|
3296
|
+
declare class ScrollAction {
|
|
3297
|
+
offset: number;
|
|
3298
|
+
constructor(offset: number);
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* @hidden
|
|
3303
|
+
*/
|
|
3304
|
+
declare interface ScrollActionArguments {
|
|
3305
|
+
index: number;
|
|
3306
|
+
target: HTMLDivElement | null;
|
|
3307
|
+
scrollAction?: ScrollAction;
|
|
3308
|
+
pageAction?: PageAction;
|
|
3309
|
+
animationInProgress: boolean;
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
/**
|
|
3313
|
+
* @hidden
|
|
3314
|
+
*/
|
|
3315
|
+
declare enum ScrollDirection {
|
|
3316
|
+
Backward = 0,
|
|
3317
|
+
Forward = 1
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
/**
|
|
3321
|
+
* @hidden
|
|
3322
|
+
*/
|
|
3323
|
+
export declare class ScrollSyncService {
|
|
3324
|
+
dom: DOMService;
|
|
3325
|
+
private divideByMagnitude;
|
|
3326
|
+
private powerByMagnitude;
|
|
3327
|
+
private navigator;
|
|
3328
|
+
private view;
|
|
3329
|
+
private monthScrolled;
|
|
3330
|
+
private navScrolled;
|
|
3331
|
+
constructor(dom: DOMService);
|
|
3332
|
+
configure(activeView: CalendarViewEnum): void;
|
|
3333
|
+
sync(navigator: Virtualization, view: Virtualization, e: any): void;
|
|
3334
|
+
scrollSiblingOf(scrolledElement: any): void;
|
|
3335
|
+
siblingComponent(scrollableElement: HTMLElement): Virtualization;
|
|
3336
|
+
calculateScroll(component: Virtualization, scrollTop: number): number;
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
/**
|
|
3340
|
+
* @hidden
|
|
3341
|
+
*/
|
|
3342
|
+
export declare class SecondsService implements ListService {
|
|
3343
|
+
private intl;
|
|
3344
|
+
private toListItem;
|
|
3345
|
+
private min;
|
|
3346
|
+
private max;
|
|
3347
|
+
private step;
|
|
3348
|
+
private insertUndividedMax;
|
|
3349
|
+
constructor(intl: IntlService);
|
|
3350
|
+
apply(value: Date, candidate: Date): Date;
|
|
3351
|
+
configure(settings: ListServiceSettings): void;
|
|
3352
|
+
data(selectedValue?: Date): ListItem[];
|
|
3353
|
+
isRangeChanged(min: Date, max: Date): boolean;
|
|
3354
|
+
limitRange(min: Date, max: Date, value?: Date): Date[];
|
|
3355
|
+
total(value?: Date): number;
|
|
3356
|
+
selectedIndex(value: Date): number;
|
|
3357
|
+
valueInList(value: Date): boolean;
|
|
3358
|
+
private divideByStep;
|
|
3359
|
+
private addLast;
|
|
3360
|
+
private addMissing;
|
|
3361
|
+
private countFromMin;
|
|
3362
|
+
private isMissing;
|
|
3363
|
+
private isLastMissing;
|
|
3364
|
+
private lastSecond;
|
|
3365
|
+
private range;
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
/**
|
|
3369
|
+
* The type that defines the selection range of the Calendar.
|
|
3370
|
+
*/
|
|
3371
|
+
export declare interface SelectionRange {
|
|
3372
|
+
/**
|
|
3373
|
+
* The beginning of the selection range.
|
|
3374
|
+
*/
|
|
3375
|
+
start: Date | null;
|
|
3376
|
+
/**
|
|
3377
|
+
* The end of the selection range.
|
|
3378
|
+
*/
|
|
3379
|
+
end: Date | null;
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
/**
|
|
3383
|
+
* The literal type that defines which end of the selection range is active.
|
|
3384
|
+
*/
|
|
3385
|
+
export declare type SelectionRangeEnd = 'start' | 'end' | null;
|
|
3386
|
+
|
|
3387
|
+
/**
|
|
3388
|
+
* @hidden
|
|
3389
|
+
*/
|
|
3390
|
+
export declare const separator = "daterangepicker.separator";
|
|
3391
|
+
|
|
3392
|
+
/**
|
|
3393
|
+
* @hidden
|
|
3394
|
+
*/
|
|
3395
|
+
export declare const start = "daterangepicker.start";
|
|
3396
|
+
|
|
3397
|
+
/**
|
|
3398
|
+
* @hidden
|
|
3399
|
+
*/
|
|
3400
|
+
export declare const swapStartEnd = "daterangepicker.swapStartEnd";
|
|
3401
|
+
|
|
3402
|
+
/**
|
|
3403
|
+
* @hidden
|
|
3404
|
+
*/
|
|
3405
|
+
export declare class TimeList extends React_2.Component<TimeListProps, {}> {
|
|
3406
|
+
static propTypes: {
|
|
3407
|
+
id: PropTypes.Requireable<number>;
|
|
3408
|
+
max: PropTypes.Requireable<Date>;
|
|
3409
|
+
min: PropTypes.Requireable<Date>;
|
|
3410
|
+
part: (props: TimeListProps, propName: string, componentName: string) => null;
|
|
3411
|
+
step: (props: TimeListProps, propName: string, componentName: string) => null;
|
|
3412
|
+
value: PropTypes.Requireable<Date>;
|
|
3413
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
3414
|
+
show: PropTypes.Requireable<boolean>;
|
|
3415
|
+
};
|
|
3416
|
+
static defaultProps: {
|
|
3417
|
+
boundRange: boolean;
|
|
3418
|
+
max: Date;
|
|
3419
|
+
min: Date;
|
|
3420
|
+
step: number;
|
|
3421
|
+
smoothScroll: boolean;
|
|
3422
|
+
};
|
|
3423
|
+
protected dom: DOMService_2;
|
|
3424
|
+
private intl;
|
|
3425
|
+
private _element;
|
|
3426
|
+
private service;
|
|
3427
|
+
private virtualization;
|
|
3428
|
+
private topOffset;
|
|
3429
|
+
private bottomOffset;
|
|
3430
|
+
private itemHeight;
|
|
3431
|
+
private listHeight;
|
|
3432
|
+
private topThreshold;
|
|
3433
|
+
private bottomThreshold;
|
|
3434
|
+
private animateToIndex;
|
|
3435
|
+
constructor(props: TimeListProps);
|
|
3436
|
+
get element(): HTMLDivElement | null;
|
|
3437
|
+
protected get animate(): boolean;
|
|
3438
|
+
private get min();
|
|
3439
|
+
private get max();
|
|
3440
|
+
private get step();
|
|
3441
|
+
/**
|
|
3442
|
+
* @hidden
|
|
3443
|
+
*/
|
|
3444
|
+
componentDidMount(): void;
|
|
3445
|
+
/**
|
|
3446
|
+
* @hidden
|
|
3447
|
+
*/
|
|
3448
|
+
componentDidUpdate(): void;
|
|
3449
|
+
/**
|
|
3450
|
+
* @hidden
|
|
3451
|
+
*/
|
|
3452
|
+
render(): JSX_2.Element | undefined;
|
|
3453
|
+
focus: (args?: any) => void;
|
|
3454
|
+
protected itemOffset: (scrollTop: number) => number;
|
|
3455
|
+
protected calculateHeights: () => void;
|
|
3456
|
+
protected configureServices: ({ min, max, value }?: TimeListProps) => void;
|
|
3457
|
+
protected serviceSettings: (settings?: any) => ListServiceSettings;
|
|
3458
|
+
private handleScrollAction;
|
|
3459
|
+
private handleFocus;
|
|
3460
|
+
private handleBlur;
|
|
3461
|
+
private handleMouseOver;
|
|
3462
|
+
private handleKeyDown;
|
|
3463
|
+
private handleChange;
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
/**
|
|
3467
|
+
* @hidden
|
|
3468
|
+
*/
|
|
3469
|
+
declare interface TimeListProps {
|
|
3470
|
+
id?: number;
|
|
3471
|
+
max?: Date;
|
|
3472
|
+
min?: Date;
|
|
3473
|
+
onBlur?: any;
|
|
3474
|
+
onChange?: any;
|
|
3475
|
+
onFocus?: any;
|
|
3476
|
+
part: DateFormatPart;
|
|
3477
|
+
step?: number;
|
|
3478
|
+
value: Date;
|
|
3479
|
+
smoothScroll?: boolean;
|
|
3480
|
+
boundRange?: boolean;
|
|
3481
|
+
disabled?: boolean;
|
|
3482
|
+
show?: boolean;
|
|
3483
|
+
mobileMode?: boolean;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* @hidden
|
|
3488
|
+
*/
|
|
3489
|
+
export declare class TimePart extends React_2.Component<TimePartProps, TimePartState> {
|
|
3490
|
+
static propTypes: {
|
|
3491
|
+
cancelButton: PropTypes.Requireable<boolean>;
|
|
3492
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
3493
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
3494
|
+
skeleton: PropTypes.Requireable<string>;
|
|
3495
|
+
pattern: PropTypes.Requireable<string>;
|
|
3496
|
+
date: PropTypes.Requireable<string>;
|
|
3497
|
+
time: PropTypes.Requireable<string>;
|
|
3498
|
+
datetime: PropTypes.Requireable<string>;
|
|
3499
|
+
era: PropTypes.Requireable<string>;
|
|
3500
|
+
year: PropTypes.Requireable<string>;
|
|
3501
|
+
month: PropTypes.Requireable<string>;
|
|
3502
|
+
day: PropTypes.Requireable<string>;
|
|
3503
|
+
weekday: PropTypes.Requireable<string>;
|
|
3504
|
+
hour: PropTypes.Requireable<string>;
|
|
3505
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
3506
|
+
minute: PropTypes.Requireable<string>;
|
|
3507
|
+
second: PropTypes.Requireable<string>;
|
|
3508
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
3509
|
+
}> | null | undefined>>;
|
|
3510
|
+
max: PropTypes.Requireable<Date>;
|
|
3511
|
+
min: PropTypes.Requireable<Date>;
|
|
3512
|
+
nowButton: PropTypes.Requireable<boolean>;
|
|
3513
|
+
steps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
3514
|
+
hour: PropTypes.Requireable<number>;
|
|
3515
|
+
minute: PropTypes.Requireable<number>;
|
|
3516
|
+
second: PropTypes.Requireable<number>;
|
|
3517
|
+
}>>;
|
|
3518
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
3519
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
3520
|
+
value: PropTypes.Requireable<Date>;
|
|
3521
|
+
show: PropTypes.Requireable<boolean>;
|
|
3522
|
+
};
|
|
3523
|
+
static defaultProps: {
|
|
3524
|
+
value: null;
|
|
3525
|
+
disabled: boolean;
|
|
3526
|
+
nowButton: boolean;
|
|
3527
|
+
cancelButton: boolean;
|
|
3528
|
+
format: string;
|
|
3529
|
+
min: Date;
|
|
3530
|
+
max: Date;
|
|
3531
|
+
steps: {};
|
|
3532
|
+
boundRange: boolean;
|
|
3533
|
+
};
|
|
3534
|
+
readonly state: TimePartState;
|
|
3535
|
+
private _element;
|
|
3536
|
+
private _nowButton;
|
|
3537
|
+
private dateFormatParts;
|
|
3538
|
+
private timeLists;
|
|
3539
|
+
private snapTime;
|
|
3540
|
+
private nextTickId;
|
|
3541
|
+
constructor(props: TimePartProps);
|
|
3542
|
+
/**
|
|
3543
|
+
* @hidden
|
|
3544
|
+
*/
|
|
3545
|
+
get element(): HTMLSpanElement | null;
|
|
3546
|
+
get value(): Date;
|
|
3547
|
+
protected get intl(): IntlService;
|
|
3548
|
+
private get min();
|
|
3549
|
+
private get max();
|
|
3550
|
+
private get steps();
|
|
3551
|
+
protected get boundRange(): boolean;
|
|
3552
|
+
/**
|
|
3553
|
+
* @hidden
|
|
3554
|
+
*/
|
|
3555
|
+
componentWillUnmount(): void;
|
|
3556
|
+
componentDidMount(): void;
|
|
3557
|
+
/**
|
|
3558
|
+
* @hidden
|
|
3559
|
+
*/
|
|
3560
|
+
render(): JSX_2.Element;
|
|
3561
|
+
focus: (args?: FocusOptions, focusNowButton?: boolean) => void;
|
|
3562
|
+
protected timeFormatReducer: (acc: string, current: DateFormatPart) => string;
|
|
3563
|
+
protected timeFormatFilter: (part: DateFormatPart, index: number, all: DateFormatPart[]) => boolean;
|
|
3564
|
+
protected nextTick(f: () => any): void;
|
|
3565
|
+
protected hasActiveButton(): boolean | null;
|
|
3566
|
+
protected focusList: (dir: Direction_2) => void;
|
|
3567
|
+
protected listReducer: (state: any, list: any, idx: number, all: any) => any;
|
|
3568
|
+
protected showNowButton: () => boolean | undefined;
|
|
3569
|
+
protected hasSteps(): boolean;
|
|
3570
|
+
private handleKeyDown;
|
|
3571
|
+
private handleListBlur;
|
|
3572
|
+
private handleListFocus;
|
|
3573
|
+
private handleChange;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
/**
|
|
3577
|
+
* @hidden
|
|
3578
|
+
*/
|
|
3579
|
+
declare interface TimePartProps {
|
|
3580
|
+
disabled?: boolean;
|
|
3581
|
+
format?: string | DateFormatOptions;
|
|
3582
|
+
max?: Date;
|
|
3583
|
+
min?: Date;
|
|
3584
|
+
nowButton?: boolean;
|
|
3585
|
+
onChange?: any;
|
|
3586
|
+
steps?: TimePickerIncrementalSteps;
|
|
3587
|
+
smoothScroll?: boolean;
|
|
3588
|
+
tabIndex?: number;
|
|
3589
|
+
value?: Date | null;
|
|
3590
|
+
boundRange?: boolean;
|
|
3591
|
+
onNowClick?: any;
|
|
3592
|
+
className?: string;
|
|
3593
|
+
onMount?: (value: Date) => void;
|
|
3594
|
+
onNowKeyDown?: (event: React_2.KeyboardEvent) => void;
|
|
3595
|
+
show?: boolean;
|
|
3596
|
+
mobileMode?: boolean;
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
/**
|
|
3600
|
+
* @hidden
|
|
3601
|
+
*/
|
|
3602
|
+
declare interface TimePartState {
|
|
3603
|
+
activeListIndex: number;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
/** @hidden */
|
|
3607
|
+
export declare type TimePicker = TimePickerHandle;
|
|
3608
|
+
|
|
3609
|
+
/**
|
|
3610
|
+
* Represents the KendoReact TimePicker Component.
|
|
3611
|
+
*
|
|
3612
|
+
* Accepts properties of type [TimePicker]({% slug api_dateinputs_timepickerprops %}).
|
|
3613
|
+
* Obtaining the `ref` returns an object of type [TimePickerHandle]({% slug api_dateinputs_timepickerhandle %}).
|
|
3614
|
+
*/
|
|
3615
|
+
export declare const TimePicker: React_2.ForwardRefExoticComponent<TimePickerProps & React_2.RefAttributes<any>>;
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* The arguments for the `onChange` event of the TimePicker.
|
|
3619
|
+
*/
|
|
3620
|
+
export declare interface TimePickerChangeEvent {
|
|
3621
|
+
nativeEvent?: any;
|
|
3622
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
3623
|
+
value: Date | null;
|
|
3624
|
+
show: boolean;
|
|
3625
|
+
target: TimePicker;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* The arguments for the `onClose` event of the TimePicker.
|
|
3630
|
+
*/
|
|
3631
|
+
export declare interface TimePickerCloseEvent {
|
|
3632
|
+
target: TimePicker;
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
* Represent the `ref` of the TimePicker component.
|
|
3637
|
+
*/
|
|
3638
|
+
export declare interface TimePickerHandle extends Pick<TimePickerWithoutContext, keyof TimePickerWithoutContext> {
|
|
3639
|
+
/**
|
|
3640
|
+
* Gets the DateInput component inside the TimePicker component.
|
|
3641
|
+
*/
|
|
3642
|
+
dateInput: DateInput | null;
|
|
3643
|
+
/**
|
|
3644
|
+
* Returns the HTML element of the TimePicker component.
|
|
3645
|
+
*/
|
|
3646
|
+
element: HTMLSpanElement | null;
|
|
3647
|
+
/**
|
|
3648
|
+
* Gets the `name` property of the TimePicker.
|
|
3649
|
+
*/
|
|
3650
|
+
name: string | undefined;
|
|
3651
|
+
/**
|
|
3652
|
+
* Gets the popup state of the TimeSelector.
|
|
3653
|
+
*/
|
|
3654
|
+
show: boolean;
|
|
3655
|
+
/**
|
|
3656
|
+
* Represents the validity state into which the TimePicker is set.
|
|
3657
|
+
*/
|
|
3658
|
+
validity: FormComponentValidity;
|
|
3659
|
+
/**
|
|
3660
|
+
* Gets the value of the TimePicker.
|
|
3661
|
+
*/
|
|
3662
|
+
value: Date | null;
|
|
3663
|
+
/**
|
|
3664
|
+
* Gets the TimeSelector component inside the TimePicker component.
|
|
3665
|
+
*/
|
|
3666
|
+
timeSelector: TimeSelector | null;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
/**
|
|
3670
|
+
* The interface which defines all possible incremental steps in the TimePicker.
|
|
3671
|
+
*/
|
|
3672
|
+
declare interface TimePickerIncrementalSteps {
|
|
3673
|
+
hour?: number;
|
|
3674
|
+
minute?: number;
|
|
3675
|
+
second?: number;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
/**
|
|
3679
|
+
* The arguments for the `onOpen` event of the TimePicker.
|
|
3680
|
+
*/
|
|
3681
|
+
export declare interface TimePickerOpenEvent {
|
|
3682
|
+
target: TimePicker;
|
|
3683
|
+
}
|
|
3684
|
+
|
|
3685
|
+
/**
|
|
3686
|
+
* Represents the props of the [KendoReact TimePicker component]({% slug overview_timepicker %}).
|
|
3687
|
+
*/
|
|
3688
|
+
export declare interface TimePickerProps extends TimePickerSettings, FormComponentProps {
|
|
3689
|
+
/**
|
|
3690
|
+
* Sets the default value of the TimePicker ([see example]({% slug default_value_timepicker %}#toc-setting-the-default-value)).
|
|
3691
|
+
*/
|
|
3692
|
+
defaultValue?: Date | null;
|
|
3693
|
+
/**
|
|
3694
|
+
* Fires each time the user selects a new value ([see example]({% slug controlled_timepicker %}#toc-controlling-the-date-value)).
|
|
3695
|
+
*/
|
|
3696
|
+
onChange?: (event: TimePickerChangeEvent) => void;
|
|
3697
|
+
/**
|
|
3698
|
+
* Fires each time the popup is opened.
|
|
3699
|
+
*/
|
|
3700
|
+
onOpen?: (event: TimePickerOpenEvent) => void;
|
|
3701
|
+
/**
|
|
3702
|
+
* Fires each time the popup is closed.
|
|
3703
|
+
*/
|
|
3704
|
+
onClose?: (event: TimePickerCloseEvent) => void;
|
|
3705
|
+
/**
|
|
3706
|
+
* Specifies the value of the TimePicker ([see example]({% slug controlled_timepicker %}#toc-controlling-the-date-value)).
|
|
3707
|
+
*
|
|
3708
|
+
* > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
|
|
3709
|
+
*/
|
|
3710
|
+
value?: Date | null;
|
|
3711
|
+
/**
|
|
3712
|
+
* Configures the `size` of the TimePicker.
|
|
3713
|
+
*
|
|
3714
|
+
* The available options are:
|
|
3715
|
+
* - small
|
|
3716
|
+
* - medium
|
|
3717
|
+
* - large
|
|
3718
|
+
* - null—Does not set a size `className`.
|
|
3719
|
+
*
|
|
3720
|
+
* @default `medium`
|
|
3721
|
+
*/
|
|
3722
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
3723
|
+
/**
|
|
3724
|
+
* Configures the `roundness` of the TimePicker.
|
|
3725
|
+
*
|
|
3726
|
+
* The available options are:
|
|
3727
|
+
* - small
|
|
3728
|
+
* - medium
|
|
3729
|
+
* - large
|
|
3730
|
+
* - full
|
|
3731
|
+
* - null—Does not set a rounded `className`.
|
|
3732
|
+
*
|
|
3733
|
+
* @default `medium`
|
|
3734
|
+
*/
|
|
3735
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
3736
|
+
/**
|
|
3737
|
+
* Configures the `fillMode` of the TimePicker.
|
|
3738
|
+
*
|
|
3739
|
+
* The available options are:
|
|
3740
|
+
* - solid
|
|
3741
|
+
* - outline
|
|
3742
|
+
* - flat
|
|
3743
|
+
* - null—Does not set a fillMode `className`.
|
|
3744
|
+
*
|
|
3745
|
+
* @default `solid`
|
|
3746
|
+
*/
|
|
3747
|
+
fillMode?: null | 'solid' | 'flat' | 'outline';
|
|
3748
|
+
/**
|
|
3749
|
+
* Providing different rendering of the popup element based on the screen dimensions.
|
|
3750
|
+
*/
|
|
3751
|
+
adaptive?: boolean;
|
|
3752
|
+
/**
|
|
3753
|
+
* Specifies the text that is rendered as title in the adaptive popup.
|
|
3754
|
+
*/
|
|
3755
|
+
adaptiveTitle?: string;
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* Represents the PropsContext of the `TimePicker` component.
|
|
3760
|
+
* Used for global configuration of all `TimePicker` instances.
|
|
3761
|
+
*
|
|
3762
|
+
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
3763
|
+
*/
|
|
3764
|
+
export declare const TimePickerPropsContext: React_2.Context<(p: TimePickerProps) => TimePickerProps>;
|
|
3765
|
+
|
|
3766
|
+
/**
|
|
3767
|
+
* @hidden
|
|
3768
|
+
*/
|
|
3769
|
+
export declare interface TimePickerSettings {
|
|
3770
|
+
/**
|
|
3771
|
+
* Sets the `className` of the TimePicker.
|
|
3772
|
+
*/
|
|
3773
|
+
className?: string;
|
|
3774
|
+
/**
|
|
3775
|
+
* Determines whether to display the **Cancel** button in the popup.
|
|
3776
|
+
*/
|
|
3777
|
+
cancelButton?: boolean;
|
|
3778
|
+
/**
|
|
3779
|
+
* Determines whether to display the **Now** button in the popup.
|
|
3780
|
+
*
|
|
3781
|
+
* > If the current time is out of range or the incremental step is greater than `1`, the **Now** button will be hidden.
|
|
3782
|
+
*/
|
|
3783
|
+
nowButton?: boolean;
|
|
3784
|
+
/**
|
|
3785
|
+
* Sets the default state of the popup upon render ([see example]({% slug default_value_timepicker %}#toc-setting-the-default-popup-state)).
|
|
3786
|
+
*/
|
|
3787
|
+
defaultShow?: boolean;
|
|
3788
|
+
/**
|
|
3789
|
+
* Determines whether the TimePicker is disabled ([see example]({% slug disabled_timepicker %})).
|
|
3790
|
+
*/
|
|
3791
|
+
disabled?: boolean;
|
|
3792
|
+
/**
|
|
3793
|
+
* Specifies the date format that is used to display the input value ([see example]({% slug formats_timepicker %})).
|
|
3794
|
+
*/
|
|
3795
|
+
format?: string | DateFormatOptions;
|
|
3796
|
+
/**
|
|
3797
|
+
* Defines the descriptions of the format sections in the input field ([see example]({% slug placeholders_timepicker %})).
|
|
3798
|
+
*/
|
|
3799
|
+
formatPlaceholder?: DateInputFormatPlaceholder;
|
|
3800
|
+
/**
|
|
3801
|
+
* Specifies the `id` of the TimePicker.
|
|
3802
|
+
*/
|
|
3803
|
+
id?: string;
|
|
3804
|
+
/**
|
|
3805
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
3806
|
+
* For example these elements could contain error or hint message.
|
|
3807
|
+
*/
|
|
3808
|
+
ariaDescribedBy?: string;
|
|
3809
|
+
/**
|
|
3810
|
+
* Identifies the element(s) which will label the component.
|
|
3811
|
+
*/
|
|
3812
|
+
ariaLabelledBy?: string;
|
|
3813
|
+
/**
|
|
3814
|
+
* Specifies the greatest valid time ([see example]({% slug timeranges_timepicker %})).
|
|
3815
|
+
*/
|
|
3816
|
+
max?: Date;
|
|
3817
|
+
/**
|
|
3818
|
+
* Specifies the smallest valid time ([see example]({% slug timeranges_timepicker %})).
|
|
3819
|
+
*/
|
|
3820
|
+
min?: Date;
|
|
3821
|
+
/**
|
|
3822
|
+
* Specifies the `name` property of the `input` DOM element.
|
|
3823
|
+
*/
|
|
3824
|
+
name?: string;
|
|
3825
|
+
/**
|
|
3826
|
+
* Fires each time any of the TimePicker elements gets blurred.
|
|
3827
|
+
*/
|
|
3828
|
+
onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
3829
|
+
/**
|
|
3830
|
+
* Fires each time the user focuses any of the TimePicker elements.
|
|
3831
|
+
*/
|
|
3832
|
+
onFocus?: (event: React.FocusEvent<HTMLSpanElement | HTMLDivElement>) => void;
|
|
3833
|
+
/**
|
|
3834
|
+
* Configures the popup options of the TimePicker.
|
|
3835
|
+
*
|
|
3836
|
+
* The available options are:
|
|
3837
|
+
* - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
3838
|
+
* - `appendTo:`— Defines the container to which the Popup will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
3839
|
+
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
|
|
3840
|
+
*/
|
|
3841
|
+
popupSettings?: DateInputsPopupSettings;
|
|
3842
|
+
/**
|
|
3843
|
+
* Specifies if a time selector will be displayed ([see example]({% slug controlled_timepicker %}#toc-controlling-the-popup-state)).
|
|
3844
|
+
*/
|
|
3845
|
+
show?: boolean;
|
|
3846
|
+
/**
|
|
3847
|
+
* Configures the incremental steps of the TimePicker ([see example]({% slug incrementalsteps_timepicker %})).
|
|
3848
|
+
*
|
|
3849
|
+
* > If the incremental step is greater than `1`, the **Now** button will be hidden.
|
|
3850
|
+
*/
|
|
3851
|
+
steps?: TimePickerIncrementalSteps;
|
|
3852
|
+
/**
|
|
3853
|
+
* Toggles the smooth scroll animation on time click. By default, the animation is enabled.
|
|
3854
|
+
*/
|
|
3855
|
+
smoothScroll?: boolean;
|
|
3856
|
+
/**
|
|
3857
|
+
* Sets the `tabIndex` property of the TimePicker.
|
|
3858
|
+
*/
|
|
3859
|
+
tabIndex?: number;
|
|
3860
|
+
/**
|
|
3861
|
+
* Sets the title of the `input` element of the TimePicker.
|
|
3862
|
+
*/
|
|
3863
|
+
title?: string;
|
|
3864
|
+
/**
|
|
3865
|
+
* Specifies the width of the TimePicker.
|
|
3866
|
+
*/
|
|
3867
|
+
width?: number | string;
|
|
3868
|
+
/**
|
|
3869
|
+
* Enables the customization or the override of the default Popup which is rendered by the TimePicker
|
|
3870
|
+
* ([see example]({% slug custom_rendering_timepicker %}#toc-customizing-the-popup)).
|
|
3871
|
+
*/
|
|
3872
|
+
popup?: React.ComponentType<PopupProps>;
|
|
3873
|
+
/**
|
|
3874
|
+
* Enables the customization or the override of the default DateInput which is rendered by the TimePicker
|
|
3875
|
+
* ([see example]({% slug custom_rendering_timepicker %}#toc-customizing-the-dateinput)).
|
|
3876
|
+
*/
|
|
3877
|
+
dateInput?: React.ComponentType<DateInputProps>;
|
|
3878
|
+
/**
|
|
3879
|
+
* Renders a floating label for the TimePicker.
|
|
3880
|
+
*/
|
|
3881
|
+
label?: string;
|
|
3882
|
+
/**
|
|
3883
|
+
* Specifies the hint the DateInput displays when its value is `null` or there is no partial selection.
|
|
3884
|
+
* For more information, refer to the article on
|
|
3885
|
+
* [placeholders]({% slug placeholders_timepicker %}).
|
|
3886
|
+
*/
|
|
3887
|
+
placeholder?: string | null;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* @hidden
|
|
3892
|
+
*/
|
|
3893
|
+
declare interface TimePickerState {
|
|
3894
|
+
value: Date | null;
|
|
3895
|
+
show: boolean;
|
|
3896
|
+
focused: boolean;
|
|
3897
|
+
windowWidth?: number;
|
|
3898
|
+
candidate: Date | null;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
/** @hidden */
|
|
3902
|
+
export declare class TimePickerWithoutContext extends React_2.Component<TimePickerProps, TimePickerState> implements FormComponent {
|
|
3903
|
+
/**
|
|
3904
|
+
* @hidden
|
|
3905
|
+
*/
|
|
3906
|
+
static displayName: string;
|
|
3907
|
+
/**
|
|
3908
|
+
* @hidden
|
|
3909
|
+
*/
|
|
3910
|
+
static propTypes: {
|
|
3911
|
+
className: PropTypes.Requireable<string>;
|
|
3912
|
+
cancelButton: PropTypes.Requireable<boolean>;
|
|
3913
|
+
nowButton: PropTypes.Requireable<boolean>;
|
|
3914
|
+
defaultShow: PropTypes.Requireable<boolean>;
|
|
3915
|
+
defaultValue: PropTypes.Requireable<Date>;
|
|
3916
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
3917
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
3918
|
+
skeleton: PropTypes.Requireable<string>;
|
|
3919
|
+
pattern: PropTypes.Requireable<string>;
|
|
3920
|
+
date: PropTypes.Requireable<string>;
|
|
3921
|
+
time: PropTypes.Requireable<string>;
|
|
3922
|
+
datetime: PropTypes.Requireable<string>;
|
|
3923
|
+
era: PropTypes.Requireable<string>;
|
|
3924
|
+
year: PropTypes.Requireable<string>;
|
|
3925
|
+
month: PropTypes.Requireable<string>;
|
|
3926
|
+
day: PropTypes.Requireable<string>;
|
|
3927
|
+
weekday: PropTypes.Requireable<string>;
|
|
3928
|
+
hour: PropTypes.Requireable<string>;
|
|
3929
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
3930
|
+
minute: PropTypes.Requireable<string>;
|
|
3931
|
+
second: PropTypes.Requireable<string>;
|
|
3932
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
3933
|
+
}> | null | undefined>>;
|
|
3934
|
+
formatPlaceholder: PropTypes.Requireable<NonNullable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
|
|
3935
|
+
year: PropTypes.Requireable<string>;
|
|
3936
|
+
month: PropTypes.Requireable<string>;
|
|
3937
|
+
day: PropTypes.Requireable<string>;
|
|
3938
|
+
hour: PropTypes.Requireable<string>;
|
|
3939
|
+
minute: PropTypes.Requireable<string>;
|
|
3940
|
+
second: PropTypes.Requireable<string>;
|
|
3941
|
+
}> | null | undefined>>;
|
|
3942
|
+
id: PropTypes.Requireable<string>;
|
|
3943
|
+
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
3944
|
+
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
3945
|
+
min: PropTypes.Requireable<Date>;
|
|
3946
|
+
max: PropTypes.Requireable<Date>;
|
|
3947
|
+
name: PropTypes.Requireable<string>;
|
|
3948
|
+
popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
3949
|
+
animate: PropTypes.Requireable<boolean>;
|
|
3950
|
+
appendTo: PropTypes.Requireable<any>;
|
|
3951
|
+
popupClass: PropTypes.Requireable<string>;
|
|
3952
|
+
}>>;
|
|
3953
|
+
show: PropTypes.Requireable<boolean>;
|
|
3954
|
+
steps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
3955
|
+
hour: PropTypes.Requireable<number>;
|
|
3956
|
+
minute: PropTypes.Requireable<number>;
|
|
3957
|
+
second: PropTypes.Requireable<number>;
|
|
3958
|
+
}>>;
|
|
3959
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
3960
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
3961
|
+
title: PropTypes.Requireable<string>;
|
|
3962
|
+
value: PropTypes.Requireable<Date>;
|
|
3963
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
3964
|
+
validationMessage: PropTypes.Requireable<string>;
|
|
3965
|
+
required: PropTypes.Requireable<boolean>;
|
|
3966
|
+
validate: PropTypes.Requireable<boolean>;
|
|
3967
|
+
valid: PropTypes.Requireable<boolean>;
|
|
3968
|
+
size: PropTypes.Requireable<"small" | "large" | "medium" | null | undefined>;
|
|
3969
|
+
rounded: PropTypes.Requireable<"small" | "large" | "medium" | "full" | null | undefined>;
|
|
3970
|
+
fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | null | undefined>;
|
|
3971
|
+
};
|
|
3972
|
+
/**
|
|
3973
|
+
* @hidden
|
|
3974
|
+
*/
|
|
3975
|
+
static defaultProps: {
|
|
3976
|
+
defaultShow: boolean;
|
|
3977
|
+
defaultValue: null;
|
|
3978
|
+
disabled: boolean;
|
|
3979
|
+
format: string;
|
|
3980
|
+
max: Date;
|
|
3981
|
+
min: Date;
|
|
3982
|
+
popupSettings: {};
|
|
3983
|
+
tabIndex: number;
|
|
3984
|
+
steps: {};
|
|
3985
|
+
required: boolean;
|
|
3986
|
+
validityStyles: boolean;
|
|
3987
|
+
dateInput: React_2.ComponentType<DateInputProps<any>>;
|
|
3988
|
+
size: "small" | "large" | "medium" | null | undefined;
|
|
3989
|
+
rounded: "small" | "large" | "medium" | "full" | null | undefined;
|
|
3990
|
+
fillMode: "flat" | "solid" | "outline" | null | undefined;
|
|
3991
|
+
};
|
|
3992
|
+
/**
|
|
3993
|
+
* @hidden
|
|
3994
|
+
*/
|
|
3995
|
+
readonly state: TimePickerState;
|
|
3996
|
+
private get _popupId();
|
|
3997
|
+
private _element;
|
|
3998
|
+
private _dateInput;
|
|
3999
|
+
private _timeSelector;
|
|
4000
|
+
private valueDuringOnChange?;
|
|
4001
|
+
private showDuringOnChange?;
|
|
4002
|
+
private shouldFocusDateInput;
|
|
4003
|
+
private prevShow;
|
|
4004
|
+
private observerResize?;
|
|
4005
|
+
private get document();
|
|
4006
|
+
constructor(props: TimePickerProps);
|
|
4007
|
+
/**
|
|
4008
|
+
* Gets the wrapping element of the TimePicker.
|
|
4009
|
+
*/
|
|
4010
|
+
get element(): HTMLSpanElement | null;
|
|
4011
|
+
/**
|
|
4012
|
+
* Gets the DateInput component inside the TimePicker component.
|
|
4013
|
+
*/
|
|
4014
|
+
get dateInput(): DateInput | null;
|
|
4015
|
+
/**
|
|
4016
|
+
* Gets the TimeSelector component inside the TimePicker component.
|
|
4017
|
+
*/
|
|
4018
|
+
get timeSelector(): TimeSelector | null;
|
|
4019
|
+
/**
|
|
4020
|
+
* Gets the value of the TimePicker.
|
|
4021
|
+
*/
|
|
4022
|
+
get value(): Date | null;
|
|
4023
|
+
/**
|
|
4024
|
+
* Gets the popup state of the TimeSelector.
|
|
4025
|
+
*/
|
|
4026
|
+
get show(): boolean;
|
|
4027
|
+
/**
|
|
4028
|
+
* Gets the `name` property of the TimePicker.
|
|
4029
|
+
*/
|
|
4030
|
+
get name(): string | undefined;
|
|
4031
|
+
/**
|
|
4032
|
+
* Represents the validity state into which the TimePicker is set.
|
|
4033
|
+
*/
|
|
4034
|
+
get validity(): FormComponentValidity;
|
|
4035
|
+
/**
|
|
4036
|
+
* The mobile mode of the ComboBox.
|
|
4037
|
+
*/
|
|
4038
|
+
get mobileMode(): boolean;
|
|
4039
|
+
/**
|
|
4040
|
+
* @hidden
|
|
4041
|
+
*/
|
|
4042
|
+
protected get validityStyles(): boolean;
|
|
4043
|
+
/**
|
|
4044
|
+
* @hidden
|
|
4045
|
+
*/
|
|
4046
|
+
protected get required(): boolean;
|
|
4047
|
+
private get popupSettings();
|
|
4048
|
+
private get min();
|
|
4049
|
+
private get max();
|
|
4050
|
+
protected get dateInputComp(): React_2.ComponentType<DateInputProps<any>>;
|
|
4051
|
+
protected get localizationService(): LocalizationService;
|
|
4052
|
+
/**
|
|
4053
|
+
* @hidden
|
|
4054
|
+
*/
|
|
4055
|
+
componentDidMount(): void;
|
|
4056
|
+
/**
|
|
4057
|
+
* @hidden
|
|
4058
|
+
*/
|
|
4059
|
+
componentDidUpdate(): void;
|
|
4060
|
+
/**
|
|
4061
|
+
* @hidden
|
|
4062
|
+
*/
|
|
4063
|
+
componentWillUnmount(): void;
|
|
4064
|
+
/**
|
|
4065
|
+
* @hidden
|
|
4066
|
+
*/
|
|
4067
|
+
focus: () => void;
|
|
4068
|
+
/**
|
|
4069
|
+
* @hidden
|
|
4070
|
+
*/
|
|
4071
|
+
render(): JSX_2.Element;
|
|
4072
|
+
private renderTimeSelector;
|
|
4073
|
+
private renderPopup;
|
|
4074
|
+
private renderAdaptivePopup;
|
|
4075
|
+
protected setTimeSelectorRef: (timeSelector: TimeSelector | null) => void;
|
|
4076
|
+
protected nextValue: (nextProps: TimePickerProps, nextState: TimePickerState) => Date | null;
|
|
4077
|
+
protected nextShow: (nextProps: TimePickerProps, nextState: TimePickerState) => boolean;
|
|
4078
|
+
protected normalizeTime(date: Date): Date;
|
|
4079
|
+
protected setShow(show: boolean): void;
|
|
4080
|
+
protected mergeTime(value: Date | null): Date | null;
|
|
4081
|
+
private handleInputValueChange;
|
|
4082
|
+
private handleTimeChange;
|
|
4083
|
+
private handleValueChange;
|
|
4084
|
+
private handleFocus;
|
|
4085
|
+
private handleBlur;
|
|
4086
|
+
private handleValueReject;
|
|
4087
|
+
private handleIconClick;
|
|
4088
|
+
private handleIconMouseDown;
|
|
4089
|
+
private handleKeyDown;
|
|
4090
|
+
private calculateMedia;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* @hidden
|
|
4095
|
+
*/
|
|
4096
|
+
export declare class TimeSelector extends React_2.Component<TimeSelectorProps, TimeSelectorState> {
|
|
4097
|
+
static propTypes: {
|
|
4098
|
+
cancelButton: PropTypes.Requireable<boolean>;
|
|
4099
|
+
className: PropTypes.Requireable<string>;
|
|
4100
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
4101
|
+
format: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
4102
|
+
skeleton: PropTypes.Requireable<string>;
|
|
4103
|
+
pattern: PropTypes.Requireable<string>;
|
|
4104
|
+
date: PropTypes.Requireable<string>;
|
|
4105
|
+
time: PropTypes.Requireable<string>;
|
|
4106
|
+
datetime: PropTypes.Requireable<string>;
|
|
4107
|
+
era: PropTypes.Requireable<string>;
|
|
4108
|
+
year: PropTypes.Requireable<string>;
|
|
4109
|
+
month: PropTypes.Requireable<string>;
|
|
4110
|
+
day: PropTypes.Requireable<string>;
|
|
4111
|
+
weekday: PropTypes.Requireable<string>;
|
|
4112
|
+
hour: PropTypes.Requireable<string>;
|
|
4113
|
+
hour12: PropTypes.Requireable<boolean>;
|
|
4114
|
+
minute: PropTypes.Requireable<string>;
|
|
4115
|
+
second: PropTypes.Requireable<string>;
|
|
4116
|
+
timeZoneName: PropTypes.Requireable<string>;
|
|
4117
|
+
}> | null | undefined>>;
|
|
4118
|
+
max: PropTypes.Requireable<Date>;
|
|
4119
|
+
min: PropTypes.Requireable<Date>;
|
|
4120
|
+
nowButton: PropTypes.Requireable<boolean>;
|
|
4121
|
+
steps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
4122
|
+
hour: PropTypes.Requireable<number>;
|
|
4123
|
+
minute: PropTypes.Requireable<number>;
|
|
4124
|
+
second: PropTypes.Requireable<number>;
|
|
4125
|
+
}>>;
|
|
4126
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
4127
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
4128
|
+
value: PropTypes.Requireable<Date>;
|
|
4129
|
+
show: PropTypes.Requireable<boolean>;
|
|
4130
|
+
};
|
|
4131
|
+
static defaultProps: {
|
|
4132
|
+
value: null;
|
|
4133
|
+
disabled: boolean;
|
|
4134
|
+
cancelButton: boolean;
|
|
4135
|
+
format: string;
|
|
4136
|
+
min: Date;
|
|
4137
|
+
max: Date;
|
|
4138
|
+
boundRange: boolean;
|
|
4139
|
+
footer: boolean;
|
|
4140
|
+
};
|
|
4141
|
+
readonly state: TimeSelectorState;
|
|
4142
|
+
private _element;
|
|
4143
|
+
private _cancelButton;
|
|
4144
|
+
private _acceptButton;
|
|
4145
|
+
private dateFormatParts;
|
|
4146
|
+
private valueDuringOnChange?;
|
|
4147
|
+
private timePart;
|
|
4148
|
+
private mergeValue;
|
|
4149
|
+
private nextTickId;
|
|
4150
|
+
constructor(props: TimeSelectorProps);
|
|
4151
|
+
/**
|
|
4152
|
+
* @hidden
|
|
4153
|
+
*/
|
|
4154
|
+
get element(): HTMLSpanElement | null;
|
|
4155
|
+
get value(): Date | null;
|
|
4156
|
+
protected get intl(): IntlService;
|
|
4157
|
+
private get current();
|
|
4158
|
+
/**
|
|
4159
|
+
* @hidden
|
|
4160
|
+
*/
|
|
4161
|
+
componentWillUnmount(): void;
|
|
4162
|
+
/**
|
|
4163
|
+
* @hidden
|
|
4164
|
+
*/
|
|
4165
|
+
render(): JSX_2.Element;
|
|
4166
|
+
focusActiveList: () => void;
|
|
4167
|
+
protected nextTick(f: () => any): void;
|
|
4168
|
+
protected hasActiveButton(): boolean | null;
|
|
4169
|
+
private handleKeyDown;
|
|
4170
|
+
private revertToNowButton;
|
|
4171
|
+
private handleNowKeyDown;
|
|
4172
|
+
private handleAccept;
|
|
4173
|
+
private handleReject;
|
|
4174
|
+
private handleNowClick;
|
|
4175
|
+
private handleChange;
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
/**
|
|
4179
|
+
* @hidden
|
|
4180
|
+
*/
|
|
4181
|
+
declare interface TimeSelectorProps {
|
|
4182
|
+
cancelButton?: boolean;
|
|
4183
|
+
className?: string;
|
|
4184
|
+
disabled?: boolean;
|
|
4185
|
+
format?: string | DateFormatOptions;
|
|
4186
|
+
max?: Date;
|
|
4187
|
+
min?: Date;
|
|
4188
|
+
nowButton?: boolean;
|
|
4189
|
+
onChange?: any;
|
|
4190
|
+
handleTimeChange?: any;
|
|
4191
|
+
onReject?: any;
|
|
4192
|
+
steps?: TimePickerIncrementalSteps;
|
|
4193
|
+
smoothScroll?: boolean;
|
|
4194
|
+
tabIndex?: number;
|
|
4195
|
+
value?: Date | null;
|
|
4196
|
+
boundRange?: boolean;
|
|
4197
|
+
show?: boolean;
|
|
4198
|
+
footer?: boolean;
|
|
4199
|
+
mobileMode?: boolean;
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4202
|
+
/**
|
|
4203
|
+
* @hidden
|
|
4204
|
+
*/
|
|
4205
|
+
declare interface TimeSelectorState {
|
|
4206
|
+
value: Date | null;
|
|
4207
|
+
current: Date | null;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
/**
|
|
4211
|
+
* @hidden
|
|
4212
|
+
*/
|
|
4213
|
+
export declare const today = "calendar.today";
|
|
4214
|
+
|
|
4215
|
+
export declare class TodayCommand extends React_2.Component<TodayCommandProps> {
|
|
4216
|
+
static propTypes: {
|
|
4217
|
+
max: PropTypes.Validator<Date>;
|
|
4218
|
+
min: PropTypes.Validator<Date>;
|
|
4219
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4220
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
4221
|
+
};
|
|
4222
|
+
static defaultProps: {
|
|
4223
|
+
min: Date;
|
|
4224
|
+
max: Date;
|
|
4225
|
+
};
|
|
4226
|
+
protected get min(): Date;
|
|
4227
|
+
protected get max(): Date;
|
|
4228
|
+
private localization;
|
|
4229
|
+
protected get todayIsInRange(): boolean;
|
|
4230
|
+
private handleClick;
|
|
4231
|
+
render(): JSX_2.Element;
|
|
4232
|
+
}
|
|
4233
|
+
|
|
4234
|
+
/**
|
|
4235
|
+
* @hidden
|
|
4236
|
+
*/
|
|
4237
|
+
declare interface TodayCommandProps {
|
|
4238
|
+
min: Date;
|
|
4239
|
+
max: Date;
|
|
4240
|
+
onClick?: (event: HeaderEventArguments) => void;
|
|
4241
|
+
disabled?: boolean;
|
|
4242
|
+
tabIndex?: number;
|
|
4243
|
+
}
|
|
4244
|
+
|
|
4245
|
+
/**
|
|
4246
|
+
* Represents the default `toggleButton` component rendered by the [KendoReact Scheduler DatePicker]({% slug overview_datepicker %}).
|
|
4247
|
+
*/
|
|
4248
|
+
export declare const ToggleButton: typeof Button;
|
|
4249
|
+
|
|
4250
|
+
/**
|
|
4251
|
+
* Represents the props of the KendoReact [Toggle Button]({% slug api_dateinputs_togglebutton %}) component.
|
|
4252
|
+
*/
|
|
4253
|
+
export declare interface ToggleButtonProps extends ButtonProps {
|
|
4254
|
+
}
|
|
4255
|
+
|
|
4256
|
+
/**
|
|
4257
|
+
* @hidden
|
|
4258
|
+
*/
|
|
4259
|
+
export declare const toggleCalendar = "datepicker.toggleCalendar";
|
|
4260
|
+
|
|
4261
|
+
/**
|
|
4262
|
+
* @hidden
|
|
4263
|
+
*/
|
|
4264
|
+
export declare const toggleDateTimeSelector = "datetimepicker.toggleDateTimeSelector";
|
|
4265
|
+
|
|
4266
|
+
/**
|
|
4267
|
+
* @hidden
|
|
4268
|
+
*/
|
|
4269
|
+
export declare class ViewList extends React_2.Component<ViewListProps, ViewListState> {
|
|
4270
|
+
static propTypes: {
|
|
4271
|
+
activeView: PropTypes.Validator<number>;
|
|
4272
|
+
bottomOffset: PropTypes.Requireable<number>;
|
|
4273
|
+
cellUID: PropTypes.Validator<string>;
|
|
4274
|
+
focusedDate: PropTypes.Validator<Date>;
|
|
4275
|
+
max: PropTypes.Validator<Date>;
|
|
4276
|
+
min: PropTypes.Validator<Date>;
|
|
4277
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4278
|
+
showWeekNumbers: PropTypes.Requireable<boolean>;
|
|
4279
|
+
smoothScroll: PropTypes.Requireable<boolean>;
|
|
4280
|
+
take: PropTypes.Requireable<number>;
|
|
4281
|
+
value: PropTypes.Requireable<Date>;
|
|
4282
|
+
viewHeight: PropTypes.Requireable<number>;
|
|
4283
|
+
viewOffset: PropTypes.Requireable<number>;
|
|
4284
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
4285
|
+
};
|
|
4286
|
+
static defaultProps: {
|
|
4287
|
+
take: number;
|
|
4288
|
+
showWeekNumbers: boolean;
|
|
4289
|
+
smoothScroll: boolean;
|
|
4290
|
+
};
|
|
4291
|
+
virtualization: Virtualization | null;
|
|
4292
|
+
private calendarView;
|
|
4293
|
+
private table;
|
|
4294
|
+
private intl;
|
|
4295
|
+
private bottomOffset;
|
|
4296
|
+
private viewOffset;
|
|
4297
|
+
private viewHeight;
|
|
4298
|
+
private _element;
|
|
4299
|
+
private lastView;
|
|
4300
|
+
private isActive;
|
|
4301
|
+
private animateToIndex;
|
|
4302
|
+
private shouldScroll;
|
|
4303
|
+
private indexToScroll?;
|
|
4304
|
+
private lastFocus;
|
|
4305
|
+
get element(): HTMLDivElement | null;
|
|
4306
|
+
protected get weekNames(): string[];
|
|
4307
|
+
protected get weekNumber(): boolean;
|
|
4308
|
+
protected get take(): number;
|
|
4309
|
+
protected get animate(): boolean;
|
|
4310
|
+
protected get todayIsInRange(): boolean;
|
|
4311
|
+
constructor(props: ViewListProps);
|
|
4312
|
+
componentDidUpdate(_prevProps: ViewListProps, _prevState: ViewListState): void;
|
|
4313
|
+
focusActiveDate: () => void;
|
|
4314
|
+
blurActiveDate: () => void;
|
|
4315
|
+
render(): JSX_2.Element;
|
|
4316
|
+
protected handleVirtualizationMount: (virtualization: Virtualization) => void;
|
|
4317
|
+
protected buildMonthView: (cols: any[], weekNames: any[]) => JSX_2.Element;
|
|
4318
|
+
protected buildDates: (cols: any[], dates: Date[]) => JSX_2.Element;
|
|
4319
|
+
protected calculateHeights: () => void;
|
|
4320
|
+
protected getTake: (skip: number, total: number) => number;
|
|
4321
|
+
private handleScrollAction;
|
|
4322
|
+
private handleTodayClick;
|
|
4323
|
+
private handleDateChange;
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4326
|
+
/**
|
|
4327
|
+
* @hidden
|
|
4328
|
+
*/
|
|
4329
|
+
declare interface ViewListEventArguments {
|
|
4330
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
4331
|
+
nativeEvent?: any;
|
|
4332
|
+
value: Date;
|
|
4333
|
+
target: ViewList;
|
|
4334
|
+
isTodayClick?: boolean;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
/**
|
|
4338
|
+
* @hidden
|
|
4339
|
+
*/
|
|
4340
|
+
declare interface ViewListProps {
|
|
4341
|
+
activeView: CalendarViewEnum;
|
|
4342
|
+
bottomOffset?: number;
|
|
4343
|
+
bus: BusViewService;
|
|
4344
|
+
cellUID: string;
|
|
4345
|
+
dom: DOMService;
|
|
4346
|
+
focusedDate: Date;
|
|
4347
|
+
max: Date;
|
|
4348
|
+
min: Date;
|
|
4349
|
+
cell?: React_2.ComponentType<CalendarCellProps>;
|
|
4350
|
+
onScroll?: (event: React_2.SyntheticEvent) => void;
|
|
4351
|
+
onChange?: (event: ViewListEventArguments) => void;
|
|
4352
|
+
service: ViewService;
|
|
4353
|
+
showWeekNumbers?: boolean;
|
|
4354
|
+
smoothScroll?: boolean;
|
|
4355
|
+
take?: number;
|
|
4356
|
+
value: Date | null;
|
|
4357
|
+
viewHeight?: number;
|
|
4358
|
+
viewOffset?: number;
|
|
4359
|
+
weekCell?: React_2.ComponentType<CalendarWeekCellProps>;
|
|
4360
|
+
headerTitle?: React_2.ComponentType<CalendarHeaderTitleProps>;
|
|
4361
|
+
shouldScroll?: () => boolean;
|
|
4362
|
+
tabIndex?: number;
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4365
|
+
/**
|
|
4366
|
+
* @hidden
|
|
4367
|
+
*/
|
|
4368
|
+
declare interface ViewListState {
|
|
4369
|
+
skip: number;
|
|
4370
|
+
index: number;
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
/**
|
|
4374
|
+
* @hidden
|
|
4375
|
+
*/
|
|
4376
|
+
export declare interface ViewService {
|
|
4377
|
+
isSelectedFromArray(candidate: Date, dates: Date[], min: Date, max: Date): boolean;
|
|
4378
|
+
addToDate(min: Date, skip: number): Date;
|
|
4379
|
+
datesList(start: Date, count: number): Date[];
|
|
4380
|
+
data(options: any): CellContext[][];
|
|
4381
|
+
isEqual(candidate: Date, expected: Date): boolean;
|
|
4382
|
+
isInArray(date: Date, dates: Date[]): boolean;
|
|
4383
|
+
isInRange(candidate: Date, min: Date, max: Date): boolean;
|
|
4384
|
+
isRangeStart(date: Date): boolean;
|
|
4385
|
+
isInSameView(candidate: Date, value: Date): boolean;
|
|
4386
|
+
move(date: Date, action: Action): Date;
|
|
4387
|
+
cellTitle(current: Date): string;
|
|
4388
|
+
navigationTitle(current: Date): string;
|
|
4389
|
+
title(current: Date): string;
|
|
4390
|
+
rowLength(prependCell?: boolean): number;
|
|
4391
|
+
skip(value: Date, min: Date): number;
|
|
4392
|
+
total(min: Date, max: Date): number;
|
|
4393
|
+
value(current: Date): string;
|
|
4394
|
+
viewDate(date: Date, max: Date, border: number): Date;
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
/**
|
|
4398
|
+
* @hidden
|
|
4399
|
+
*/
|
|
4400
|
+
export declare class Virtualization extends React_2.Component<VirtualizationProps, {}> {
|
|
4401
|
+
static propTypes: {
|
|
4402
|
+
bottomOffset: PropTypes.Validator<number>;
|
|
4403
|
+
className: PropTypes.Requireable<string>;
|
|
4404
|
+
direction: PropTypes.Requireable<string>;
|
|
4405
|
+
forceScroll: PropTypes.Requireable<boolean>;
|
|
4406
|
+
itemHeight: PropTypes.Requireable<number>;
|
|
4407
|
+
itemWidth: PropTypes.Requireable<number>;
|
|
4408
|
+
maxScrollDifference: PropTypes.Requireable<number>;
|
|
4409
|
+
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4410
|
+
onScrollAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4411
|
+
scrollDuration: PropTypes.Requireable<number>;
|
|
4412
|
+
scrollOffsetSize: PropTypes.Requireable<number>;
|
|
4413
|
+
skip: PropTypes.Validator<number>;
|
|
4414
|
+
tabIndex: PropTypes.Requireable<number>;
|
|
4415
|
+
take: PropTypes.Validator<number>;
|
|
4416
|
+
topOffset: PropTypes.Validator<number>;
|
|
4417
|
+
total: PropTypes.Validator<number>;
|
|
4418
|
+
role: PropTypes.Requireable<string>;
|
|
4419
|
+
};
|
|
4420
|
+
static defaultProps: {
|
|
4421
|
+
direction: Direction;
|
|
4422
|
+
forceScroll: boolean;
|
|
4423
|
+
scrollOffsetSize: number;
|
|
4424
|
+
maxScrollDifference: number;
|
|
4425
|
+
scrollDuration: number;
|
|
4426
|
+
};
|
|
4427
|
+
private cancelAnimation;
|
|
4428
|
+
private rowHeightService;
|
|
4429
|
+
private scrollerService;
|
|
4430
|
+
private scrollContainer;
|
|
4431
|
+
private scrollAction?;
|
|
4432
|
+
private pageAction?;
|
|
4433
|
+
private lastDirection;
|
|
4434
|
+
private lastTotal;
|
|
4435
|
+
private lastTake;
|
|
4436
|
+
private animationInProgress;
|
|
4437
|
+
private restrictScroll;
|
|
4438
|
+
get element(): HTMLDivElement | null;
|
|
4439
|
+
protected get containerOffsetSize(): number;
|
|
4440
|
+
get containerScrollSize(): number;
|
|
4441
|
+
get containerScrollPosition(): number;
|
|
4442
|
+
protected get direction(): Direction;
|
|
4443
|
+
protected get scrollOffsetSize(): number;
|
|
4444
|
+
constructor(props: VirtualizationProps);
|
|
4445
|
+
activeIndex(): number;
|
|
4446
|
+
itemIndex(offset: number): number;
|
|
4447
|
+
itemOffset(index: number): number;
|
|
4448
|
+
isIndexVisible(index: number): boolean;
|
|
4449
|
+
isListScrolled(index: number): boolean;
|
|
4450
|
+
scrollTo: (value: number) => void;
|
|
4451
|
+
scrollToIndex: (index: number) => void;
|
|
4452
|
+
animateToIndex: (index: number) => void;
|
|
4453
|
+
scrollToBottom: () => void;
|
|
4454
|
+
componentDidMount(): void;
|
|
4455
|
+
render(): JSX_2.Element;
|
|
4456
|
+
protected scrollStep: (start: number, end: number) => number;
|
|
4457
|
+
protected scrollRange: (indexOffset: number, direction: ScrollDirection) => any;
|
|
4458
|
+
protected containerMaxScroll: () => number;
|
|
4459
|
+
protected getContainerScrollDirection: (indexOffset: number) => ScrollDirection;
|
|
4460
|
+
protected initServices: (props?: VirtualizationProps) => void;
|
|
4461
|
+
protected getContainerProperty: (propertyName: 'offsetHeight' | 'offsetWidth' | 'scrollHeight' | 'scrollWidth' | 'scrollTop' | 'scrollLeft') => number;
|
|
4462
|
+
private handleScroll;
|
|
4463
|
+
private handleScrollAction;
|
|
4464
|
+
private handlePageAction;
|
|
4465
|
+
}
|
|
4466
|
+
|
|
4467
|
+
/**
|
|
4468
|
+
* @hidden
|
|
4469
|
+
*/
|
|
4470
|
+
declare interface VirtualizationProps {
|
|
4471
|
+
bottomOffset: number;
|
|
4472
|
+
className?: string;
|
|
4473
|
+
direction?: Direction;
|
|
4474
|
+
itemHeight?: number;
|
|
4475
|
+
itemWidth?: number;
|
|
4476
|
+
maxScrollDifference?: number;
|
|
4477
|
+
onMount?: any;
|
|
4478
|
+
onScroll?: (event: React_2.SyntheticEvent) => void;
|
|
4479
|
+
onScrollAction?: (args: ScrollActionArguments) => void;
|
|
4480
|
+
scrollOffsetSize?: number;
|
|
4481
|
+
scrollDuration?: number;
|
|
4482
|
+
skip: number;
|
|
4483
|
+
tabIndex?: number;
|
|
4484
|
+
take: number;
|
|
4485
|
+
topOffset: number;
|
|
4486
|
+
total: number;
|
|
4487
|
+
role?: string;
|
|
4488
|
+
children?: React_2.ReactNode;
|
|
4489
|
+
}
|
|
4490
|
+
|
|
4491
|
+
/**
|
|
4492
|
+
* @hidden
|
|
4493
|
+
*/
|
|
4494
|
+
export declare class WeekNamesService {
|
|
4495
|
+
private intl;
|
|
4496
|
+
constructor(intl: IntlService);
|
|
4497
|
+
getWeekNames(includeWeekNumber?: boolean): string[];
|
|
4498
|
+
}
|
|
4499
|
+
|
|
4500
|
+
/**
|
|
4501
|
+
* @hidden
|
|
4502
|
+
*/
|
|
4503
|
+
export declare class YearViewService implements ViewService {
|
|
4504
|
+
private _intl;
|
|
4505
|
+
constructor(intl: IntlService);
|
|
4506
|
+
addToDate(min: Date, skip: number): Date;
|
|
4507
|
+
datesList(start: Date, count: number): Date[];
|
|
4508
|
+
data(options: any): CellContext[][];
|
|
4509
|
+
isSelectedFromArray(candidate: Date, dates: Date[], min: Date, max: Date): boolean;
|
|
4510
|
+
isEqual(candidate: Date | null, expected: Date | null): boolean;
|
|
4511
|
+
isInArray(date: Date, dates: Date[]): boolean;
|
|
4512
|
+
isInRange(candidate: Date, min: Date, max: Date): boolean;
|
|
4513
|
+
isInSameView(candidate: Date, value: Date): boolean;
|
|
4514
|
+
isRangeStart(value: Date): boolean;
|
|
4515
|
+
move(value: Date, action: Action): Date;
|
|
4516
|
+
cellTitle(value: Date): string;
|
|
4517
|
+
navigationTitle(value?: Date): string;
|
|
4518
|
+
title(current?: Date): string;
|
|
4519
|
+
rowLength(_?: boolean): number;
|
|
4520
|
+
skip(value: Date, min: Date): number;
|
|
4521
|
+
total(min: Date, max: Date): number;
|
|
4522
|
+
value(current: Date): string;
|
|
4523
|
+
viewDate(date: Date, max: Date, border?: number): Date;
|
|
4524
|
+
private abbrMonthNames;
|
|
4525
|
+
private normalize;
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
export { }
|