@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
|
@@ -0,0 +1,275 @@
|
|
|
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
|
+
"use client";
|
|
9
|
+
import * as i from "react";
|
|
10
|
+
import { provideLocalizationService as B, registerForLocalization as P } from "@progress/kendo-react-intl";
|
|
11
|
+
import { dateTimePickerCancel as v, messages as m, dateTimePickerSet as b, date as k, time as y } from "../messages/index.mjs";
|
|
12
|
+
import { Button as u, ButtonGroup as S } from "@progress/kendo-react-buttons";
|
|
13
|
+
import { Calendar as K } from "../calendar/components/Calendar.mjs";
|
|
14
|
+
import { TimePart as N } from "../timepicker/TimePart.mjs";
|
|
15
|
+
import { MIDNIGHT_DATE as d, MIN_TIME as R, MAX_TIME as M, getToday as _, setTime as C } from "../utils.mjs";
|
|
16
|
+
import { isEqualDate as D } from "@progress/kendo-date-math";
|
|
17
|
+
import { Keys as o, classNames as x, getActiveElement as A } from "@progress/kendo-react-common";
|
|
18
|
+
import { getNow as E } from "../timepicker/utils.mjs";
|
|
19
|
+
const f = class f extends i.Component {
|
|
20
|
+
constructor(a) {
|
|
21
|
+
super(a), this._calendar = null, this._timePart = null, this._cancelButton = null, this._acceptButton = null, this._dateButtonRef = null, this._calendarWrap = null, this.shouldFocusPart = !1, this.focus = (t) => {
|
|
22
|
+
Promise.resolve().then(() => {
|
|
23
|
+
this.state.tab === "time" && this._timePart && this._timePart.focus(t);
|
|
24
|
+
const e = this.calendarElement();
|
|
25
|
+
this.state.tab === "date" && e && e.focus(t);
|
|
26
|
+
});
|
|
27
|
+
}, this.calendarElement = () => this._calendar && this._calendar.element || this._calendarWrap && this._calendarWrap.querySelector(".k-widget.k-calendar"), this.move = (t) => {
|
|
28
|
+
if (t === "right" && this.state.tab === "time" || t === "left" && this.state.tab === "date")
|
|
29
|
+
return;
|
|
30
|
+
const e = t === "left" ? "date" : "time";
|
|
31
|
+
this.shouldFocusPart = !0, this.setState({ tab: e });
|
|
32
|
+
}, this.dateTimeFooter = () => {
|
|
33
|
+
const { cancelButton: t } = this.props, e = this.localizationService.toLanguageString(v, m[v]), s = this.localizationService.toLanguageString(b, m[b]);
|
|
34
|
+
return /* @__PURE__ */ i.createElement("div", { className: "k-datetime-footer k-actions k-actions-stretched" }, t && /* @__PURE__ */ i.createElement(
|
|
35
|
+
u,
|
|
36
|
+
{
|
|
37
|
+
type: "button",
|
|
38
|
+
ref: (n) => {
|
|
39
|
+
this._cancelButton = n;
|
|
40
|
+
},
|
|
41
|
+
className: "k-time-cancel",
|
|
42
|
+
onClick: this.handleReject,
|
|
43
|
+
onKeyDown: this.handleCancelKeyDown,
|
|
44
|
+
title: e,
|
|
45
|
+
"aria-label": e
|
|
46
|
+
},
|
|
47
|
+
e
|
|
48
|
+
), /* @__PURE__ */ i.createElement(
|
|
49
|
+
u,
|
|
50
|
+
{
|
|
51
|
+
type: "button",
|
|
52
|
+
themeColor: "primary",
|
|
53
|
+
ref: (n) => {
|
|
54
|
+
this._acceptButton = n;
|
|
55
|
+
},
|
|
56
|
+
className: "k-time-accept",
|
|
57
|
+
disabled: !this.hasDateValue,
|
|
58
|
+
onClick: this.handleAccept,
|
|
59
|
+
onKeyDown: this.handleSetKeyDown,
|
|
60
|
+
title: s,
|
|
61
|
+
"aria-label": s
|
|
62
|
+
},
|
|
63
|
+
s
|
|
64
|
+
));
|
|
65
|
+
}, this.handleReject = (t) => {
|
|
66
|
+
this.setState({ dateValue: this.props.value, timeValue: this.props.value || d });
|
|
67
|
+
const e = this.mergeDate(this.props.value, this.props.value || d);
|
|
68
|
+
if (this.props.onReject) {
|
|
69
|
+
const s = {
|
|
70
|
+
nativeEvent: t.nativeEvent,
|
|
71
|
+
syntheticEvent: t,
|
|
72
|
+
target: this,
|
|
73
|
+
value: e
|
|
74
|
+
};
|
|
75
|
+
this.props.onReject.call(void 0, s);
|
|
76
|
+
}
|
|
77
|
+
}, this.handleAccept = (t, e) => {
|
|
78
|
+
if (!this.state.dateValue || !this.state.timeValue || !this.hasDateValue)
|
|
79
|
+
return;
|
|
80
|
+
const s = this.mergeDate(this.state.dateValue, e || this.state.timeValue);
|
|
81
|
+
this.props.onChange.call(void 0, {
|
|
82
|
+
syntheticEvent: t,
|
|
83
|
+
nativeEvent: t.nativeEvent,
|
|
84
|
+
value: s,
|
|
85
|
+
target: this
|
|
86
|
+
});
|
|
87
|
+
}, this.handleNowClick = (t) => {
|
|
88
|
+
this.setState({ timeValue: E() }), this.handleAccept(t, E());
|
|
89
|
+
}, this.handleCalendarValueChange = (t) => {
|
|
90
|
+
t.syntheticEvent.stopPropagation(), this.setState({ dateValue: t.value, tab: "time" }), this.shouldFocusPart = !0;
|
|
91
|
+
}, this.handleTimeListContainerChange = (t) => {
|
|
92
|
+
this.setState({ timeValue: t });
|
|
93
|
+
}, this.handleDateClick = (t) => {
|
|
94
|
+
t.stopPropagation(), this.move("left");
|
|
95
|
+
}, this.handleTimeClick = (t) => {
|
|
96
|
+
t.stopPropagation(), this.move("right");
|
|
97
|
+
}, this.handleKeyDown = (t) => {
|
|
98
|
+
const { keyCode: e, altKey: s } = t;
|
|
99
|
+
if (!this.props.disabled)
|
|
100
|
+
switch (e) {
|
|
101
|
+
case o.enter:
|
|
102
|
+
!this.hasActiveButton() && this.hasDateValue && this.handleAccept(t);
|
|
103
|
+
return;
|
|
104
|
+
case o.left:
|
|
105
|
+
if (!s)
|
|
106
|
+
return;
|
|
107
|
+
this.move("left");
|
|
108
|
+
return;
|
|
109
|
+
case o.right:
|
|
110
|
+
if (!s)
|
|
111
|
+
return;
|
|
112
|
+
this.move("right");
|
|
113
|
+
return;
|
|
114
|
+
default:
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
}, this.handleCancelKeyDown = (t) => {
|
|
118
|
+
const { keyCode: e } = t;
|
|
119
|
+
e === o.tab && this._dateButtonRef && this._dateButtonRef.element && !this.hasDateValue && (t.preventDefault(), this._dateButtonRef.element.focus());
|
|
120
|
+
}, this.handleSetKeyDown = (t) => {
|
|
121
|
+
const { keyCode: e } = t;
|
|
122
|
+
e === o.tab && this._dateButtonRef && this._dateButtonRef.element && (t.preventDefault(), this._dateButtonRef.element.focus());
|
|
123
|
+
}, this.handleDateKeyDown = (t) => {
|
|
124
|
+
var n, h, r, c;
|
|
125
|
+
const { keyCode: e, shiftKey: s } = t;
|
|
126
|
+
s && e === o.tab && (t.stopPropagation(), this.hasDateValue ? (c = (r = this._acceptButton) == null ? void 0 : r.element) == null || c.focus() : (h = (n = this._cancelButton) == null ? void 0 : n.element) == null || h.focus()), e === o.enter && (t.stopPropagation(), this.move("left"));
|
|
127
|
+
}, this.handleTimeKeyDown = (t) => {
|
|
128
|
+
const { keyCode: e } = t;
|
|
129
|
+
e === o.enter && (t.stopPropagation(), this.move("right"));
|
|
130
|
+
}, this.handleTimePartMount = (t) => {
|
|
131
|
+
this.setState({ timeValue: t });
|
|
132
|
+
}, this.state = {
|
|
133
|
+
tab: "date",
|
|
134
|
+
dateValue: this.props.value,
|
|
135
|
+
timeValue: this.props.value || d
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
get calendar() {
|
|
139
|
+
return this._calendar;
|
|
140
|
+
}
|
|
141
|
+
get timePart() {
|
|
142
|
+
return this._timePart;
|
|
143
|
+
}
|
|
144
|
+
get hasDateValue() {
|
|
145
|
+
return this.state.dateValue !== null;
|
|
146
|
+
}
|
|
147
|
+
get localizationService() {
|
|
148
|
+
return B(this);
|
|
149
|
+
}
|
|
150
|
+
componentDidUpdate(a, t) {
|
|
151
|
+
var e, s;
|
|
152
|
+
this.shouldFocusPart && this.focus({ preventScroll: !0 }), (((e = a.value) == null ? void 0 : e.getTime()) !== ((s = this.props.value) == null ? void 0 : s.getTime()) || this.state.tab !== t.tab && this.props.value) && this.setState({
|
|
153
|
+
dateValue: a.value && this.props.value && D(a.value, this.props.value) ? this.state.dateValue : this.props.value,
|
|
154
|
+
timeValue: this.props.value || d
|
|
155
|
+
}), this.shouldFocusPart = !1;
|
|
156
|
+
}
|
|
157
|
+
render() {
|
|
158
|
+
const {
|
|
159
|
+
disabled: a,
|
|
160
|
+
min: t,
|
|
161
|
+
max: e,
|
|
162
|
+
weekNumber: s,
|
|
163
|
+
focusedDate: n,
|
|
164
|
+
format: h,
|
|
165
|
+
mobileMode: r,
|
|
166
|
+
footerActions: c
|
|
167
|
+
} = this.props, T = x(
|
|
168
|
+
{
|
|
169
|
+
"k-date-tab": this.state.tab === "date",
|
|
170
|
+
"k-time-tab": this.state.tab === "time",
|
|
171
|
+
"k-disabled": a
|
|
172
|
+
},
|
|
173
|
+
"k-datetime-wrap"
|
|
174
|
+
), V = this.localizationService.toLanguageString(k, m[k]), w = this.localizationService.toLanguageString(y, m[y]), g = {
|
|
175
|
+
min: t,
|
|
176
|
+
max: e,
|
|
177
|
+
weekNumber: s,
|
|
178
|
+
focusedDate: n,
|
|
179
|
+
disabled: a || this.state.tab !== "date",
|
|
180
|
+
value: this.state.dateValue,
|
|
181
|
+
onChange: this.handleCalendarValueChange,
|
|
182
|
+
navigation: !1,
|
|
183
|
+
tabIndex: a || this.state.tab !== "date" ? -1 : void 0,
|
|
184
|
+
mobileMode: r
|
|
185
|
+
};
|
|
186
|
+
return /* @__PURE__ */ i.createElement(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
onKeyDown: this.handleKeyDown,
|
|
190
|
+
className: T,
|
|
191
|
+
tabIndex: -1
|
|
192
|
+
},
|
|
193
|
+
/* @__PURE__ */ i.createElement("div", { className: "k-datetime-buttongroup" }, /* @__PURE__ */ i.createElement(S, { width: "100%" }, /* @__PURE__ */ i.createElement(
|
|
194
|
+
u,
|
|
195
|
+
{
|
|
196
|
+
ref: (l) => this._dateButtonRef = l,
|
|
197
|
+
type: "button",
|
|
198
|
+
selected: this.state.tab === "date",
|
|
199
|
+
togglable: !0,
|
|
200
|
+
onClick: this.handleDateClick,
|
|
201
|
+
onKeyDown: this.handleDateKeyDown
|
|
202
|
+
},
|
|
203
|
+
V
|
|
204
|
+
), /* @__PURE__ */ i.createElement(
|
|
205
|
+
u,
|
|
206
|
+
{
|
|
207
|
+
type: "button",
|
|
208
|
+
selected: this.state.tab === "time",
|
|
209
|
+
togglable: !0,
|
|
210
|
+
onClick: this.handleTimeClick,
|
|
211
|
+
onKeyDown: this.handleTimeKeyDown
|
|
212
|
+
},
|
|
213
|
+
w
|
|
214
|
+
))),
|
|
215
|
+
/* @__PURE__ */ i.createElement("div", { className: "k-datetime-selector" }, /* @__PURE__ */ i.createElement("div", { className: "k-datetime-calendar-wrap", ref: (l) => this._calendarWrap = l }, this.props.calendar ? /* @__PURE__ */ i.createElement(this.props.calendar, { key: this.state.tab, ...g }) : /* @__PURE__ */ i.createElement(
|
|
216
|
+
K,
|
|
217
|
+
{
|
|
218
|
+
key: this.state.tab,
|
|
219
|
+
ref: (l) => {
|
|
220
|
+
this._calendar = l;
|
|
221
|
+
},
|
|
222
|
+
...g
|
|
223
|
+
}
|
|
224
|
+
)), /* @__PURE__ */ i.createElement("div", { className: "k-datetime-time-wrap" }, /* @__PURE__ */ i.createElement("div", { className: r ? "k-reset k-timeselector-lg k-timeselector" : "" }, /* @__PURE__ */ i.createElement(
|
|
225
|
+
N,
|
|
226
|
+
{
|
|
227
|
+
key: 1,
|
|
228
|
+
onNowClick: this.handleNowClick,
|
|
229
|
+
disabled: a || this.state.tab !== "time",
|
|
230
|
+
ref: (l) => {
|
|
231
|
+
this._timePart = l;
|
|
232
|
+
},
|
|
233
|
+
min: this.minTime || R,
|
|
234
|
+
max: this.maxTime || M,
|
|
235
|
+
steps: this.props.steps,
|
|
236
|
+
value: this.state.timeValue,
|
|
237
|
+
format: h,
|
|
238
|
+
onChange: this.handleTimeListContainerChange,
|
|
239
|
+
onMount: this.handleTimePartMount,
|
|
240
|
+
mobileMode: r
|
|
241
|
+
}
|
|
242
|
+
)))),
|
|
243
|
+
c && this.dateTimeFooter()
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
get minTime() {
|
|
247
|
+
return this.props.minTime !== void 0 ? this.props.minTime : this.normalizeRange(this.props.min, this.state.dateValue);
|
|
248
|
+
}
|
|
249
|
+
get maxTime() {
|
|
250
|
+
return this.props.maxTime !== void 0 ? this.props.maxTime : this.normalizeRange(this.props.max, this.state.dateValue);
|
|
251
|
+
}
|
|
252
|
+
normalizeRange(a, t) {
|
|
253
|
+
return D(a, t || _()) ? a : null;
|
|
254
|
+
}
|
|
255
|
+
hasActiveButton() {
|
|
256
|
+
if (!this._acceptButton)
|
|
257
|
+
return !1;
|
|
258
|
+
const a = A(document);
|
|
259
|
+
return this._acceptButton && a === this._acceptButton.element || this._cancelButton && a === this._cancelButton.element;
|
|
260
|
+
}
|
|
261
|
+
mergeTime(a, t) {
|
|
262
|
+
return a && t ? C(t, a) : t;
|
|
263
|
+
}
|
|
264
|
+
mergeDate(a, t) {
|
|
265
|
+
return a ? C(a || _(), t) : t;
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
f.defaultProps = {
|
|
269
|
+
footerActions: !0
|
|
270
|
+
};
|
|
271
|
+
let p = f;
|
|
272
|
+
P(p);
|
|
273
|
+
export {
|
|
274
|
+
p as DateTimeSelector
|
|
275
|
+
};
|