@progress/kendo-react-dateinputs 13.4.0-develop.4 → 14.0.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/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +322 -294
- package/datetimepicker/DateTimePicker.d.ts +3 -0
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +140 -110
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/timepicker/TimePicker.d.ts +3 -0
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +170 -139
|
@@ -5,114 +5,114 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { cloneDate as
|
|
12
|
-
import { createPropsContext as
|
|
13
|
-
import { calendarIcon as
|
|
14
|
-
import { DateInput as
|
|
15
|
-
import { Calendar as
|
|
16
|
-
import { MIN_DATE as
|
|
17
|
-
import { toggleCalendar as
|
|
18
|
-
import { useLocalization as
|
|
19
|
-
import { ToggleButton as
|
|
20
|
-
import { PickerFloatingLabel as
|
|
21
|
-
import { ActionSheetContent as
|
|
22
|
-
import { AdaptiveMode as
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
defaultShow:
|
|
26
|
-
defaultValue:
|
|
27
|
-
dateInput:
|
|
28
|
-
calendar:
|
|
29
|
-
toggleButton:
|
|
30
|
-
popup:
|
|
31
|
-
disabled:
|
|
32
|
-
format:
|
|
33
|
-
max:
|
|
34
|
-
min:
|
|
35
|
-
popupSettings:
|
|
36
|
-
tabIndex:
|
|
37
|
-
weekNumber:
|
|
38
|
-
validityStyles:
|
|
8
|
+
import * as o from "react";
|
|
9
|
+
import t from "prop-types";
|
|
10
|
+
import { Popup as dt } from "@progress/kendo-react-popup";
|
|
11
|
+
import { cloneDate as le, getDate as ft } from "@progress/kendo-date-math";
|
|
12
|
+
import { createPropsContext as mt, useId as pt, useAdaptiveModeContext as gt, usePropsContext as ht, useKendoPaste as vt, canUseDOM as ue, AsyncFocusBlur as bt, classNames as se, kendoThemeMaps as ce, Keys as k } from "@progress/kendo-react-common";
|
|
13
|
+
import { calendarIcon as wt } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { DateInput as yt } from "../dateinput/DateInput.mjs";
|
|
15
|
+
import { Calendar as Ct } from "../calendar/components/Calendar.mjs";
|
|
16
|
+
import { MIN_DATE as Dt, MAX_DATE as Ot, isInDateRange as de, setTime as Pt, nullable as r } from "../utils.mjs";
|
|
17
|
+
import { toggleCalendar as fe, messages as kt } from "../messages/index.mjs";
|
|
18
|
+
import { useLocalization as Mt } from "@progress/kendo-react-intl";
|
|
19
|
+
import { ToggleButton as Rt } from "./ToggleButton.mjs";
|
|
20
|
+
import { PickerFloatingLabel as St } from "../hooks/usePickerFloatingLabel.mjs";
|
|
21
|
+
import { ActionSheetContent as _t } from "@progress/kendo-react-layout";
|
|
22
|
+
import { AdaptiveMode as It } from "../common/AdaptiveMode.mjs";
|
|
23
|
+
const me = o.forwardRef((a, pe) => {
|
|
24
|
+
const _ = pt(a.id), ge = Mt(), b = gt(), {
|
|
25
|
+
defaultShow: he = i.defaultShow,
|
|
26
|
+
defaultValue: ve = i.defaultValue,
|
|
27
|
+
dateInput: be = i.dateInput,
|
|
28
|
+
calendar: we = i.calendar,
|
|
29
|
+
toggleButton: ye = i.toggleButton,
|
|
30
|
+
popup: Ce = i.popup,
|
|
31
|
+
disabled: m = i.disabled,
|
|
32
|
+
format: De = i.format,
|
|
33
|
+
max: w = i.max,
|
|
34
|
+
min: y = i.min,
|
|
35
|
+
popupSettings: C = i.popupSettings,
|
|
36
|
+
tabIndex: Oe = i.tabIndex,
|
|
37
|
+
weekNumber: Pe = i.weekNumber,
|
|
38
|
+
validityStyles: q = i.validityStyles,
|
|
39
39
|
size: I = i.size,
|
|
40
|
-
rounded:
|
|
41
|
-
fillMode:
|
|
42
|
-
autoFocus:
|
|
43
|
-
show:
|
|
44
|
-
autoSwitchParts:
|
|
45
|
-
autoSwitchKeys:
|
|
46
|
-
twoDigitYearMax:
|
|
47
|
-
ariaLabel:
|
|
48
|
-
adaptive:
|
|
49
|
-
adaptiveTitle:
|
|
50
|
-
adaptiveSubtitle:
|
|
51
|
-
formatPlaceholder:
|
|
52
|
-
inputAttributes:
|
|
53
|
-
validationMessage:
|
|
54
|
-
visited:
|
|
55
|
-
value:
|
|
56
|
-
touched:
|
|
57
|
-
modified:
|
|
58
|
-
_adaptiveMode:
|
|
59
|
-
valid:
|
|
60
|
-
focusedDate:
|
|
61
|
-
id:
|
|
62
|
-
ariaLabelledBy:
|
|
63
|
-
ariaDescribedBy:
|
|
40
|
+
rounded: E = i.rounded,
|
|
41
|
+
fillMode: B = i.fillMode,
|
|
42
|
+
autoFocus: ke = i.autoFocus,
|
|
43
|
+
show: W,
|
|
44
|
+
autoSwitchParts: Me,
|
|
45
|
+
autoSwitchKeys: Re,
|
|
46
|
+
twoDigitYearMax: Se,
|
|
47
|
+
ariaLabel: _e,
|
|
48
|
+
adaptive: Bt,
|
|
49
|
+
adaptiveTitle: Ie = a.label || void 0,
|
|
50
|
+
adaptiveSubtitle: Ee,
|
|
51
|
+
formatPlaceholder: Be,
|
|
52
|
+
inputAttributes: Te,
|
|
53
|
+
validationMessage: H,
|
|
54
|
+
visited: Tt,
|
|
55
|
+
value: T,
|
|
56
|
+
touched: xt,
|
|
57
|
+
modified: Nt,
|
|
58
|
+
_adaptiveMode: At = b,
|
|
59
|
+
valid: U,
|
|
60
|
+
focusedDate: xe,
|
|
61
|
+
id: Ne,
|
|
62
|
+
ariaLabelledBy: Ae,
|
|
63
|
+
ariaDescribedBy: Fe,
|
|
64
64
|
placeholder: Ve,
|
|
65
|
-
onChange:
|
|
66
|
-
onOpen:
|
|
67
|
-
onClose:
|
|
68
|
-
...
|
|
69
|
-
} =
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
}, l = () =>
|
|
76
|
-
const
|
|
65
|
+
onChange: Y,
|
|
66
|
+
onOpen: $,
|
|
67
|
+
onClose: j,
|
|
68
|
+
...X
|
|
69
|
+
} = ht(Et, a), x = () => {
|
|
70
|
+
if (ue)
|
|
71
|
+
return d.current && d.current.ownerDocument || window.document;
|
|
72
|
+
}, s = () => !!(v.windowWidth && b && v.windowWidth <= (b == null ? void 0 : b.medium) && a.adaptive), p = () => {
|
|
73
|
+
const e = M.current !== void 0 ? M.current : T !== void 0 ? T : v.value;
|
|
74
|
+
return e !== null ? le(e) : null;
|
|
75
|
+
}, l = () => R.current !== void 0 ? R.current : W !== void 0 ? W : v.show, ze = () => be || i.dateInput, Le = () => ye || i.toggleButton, Ke = () => we || i.calendar, qe = () => Ce || i.popup, Z = () => a.required !== void 0 ? a.required : !1, N = () => {
|
|
76
|
+
const e = p() || T || null, n = y, u = w, S = de(e, n, u), z = H !== void 0, L = (!Z() || e != null) && S, K = U !== void 0 ? U : L;
|
|
77
77
|
return {
|
|
78
|
-
customError:
|
|
79
|
-
rangeOverflow:
|
|
80
|
-
rangeUnderflow:
|
|
81
|
-
valid:
|
|
82
|
-
valueMissing:
|
|
78
|
+
customError: z,
|
|
79
|
+
rangeOverflow: e && u.getTime() < e.getTime() || !1,
|
|
80
|
+
rangeUnderflow: e && e.getTime() < n.getTime() || !1,
|
|
81
|
+
valid: K,
|
|
82
|
+
valueMissing: e === null
|
|
83
83
|
};
|
|
84
|
-
},
|
|
85
|
-
for (const
|
|
86
|
-
|
|
87
|
-
},
|
|
84
|
+
}, We = (e) => {
|
|
85
|
+
for (const n of e)
|
|
86
|
+
P({ windowWidth: n.target.clientWidth });
|
|
87
|
+
}, He = () => {
|
|
88
88
|
c.current && c.current.focus();
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
l() !==
|
|
93
|
-
},
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
syntheticEvent:
|
|
101
|
-
nativeEvent:
|
|
102
|
-
value:
|
|
89
|
+
}, G = (e) => {
|
|
90
|
+
f.current = e;
|
|
91
|
+
}, g = (e) => {
|
|
92
|
+
l() !== e && (P({ show: e }), e && $ && $({ target: D.current }), !e && j && j({ target: D.current }));
|
|
93
|
+
}, Ue = (e) => {
|
|
94
|
+
const n = p();
|
|
95
|
+
return n && e ? Pt(e, n) : e;
|
|
96
|
+
}, Ye = (e) => {
|
|
97
|
+
C != null && C.onMouseDownOutside && C.onMouseDownOutside(e);
|
|
98
|
+
}, A = (e, n) => {
|
|
99
|
+
P({ value: le(e || void 0) }), M.current = e, R.current = !1, s() || (h.current = !0), Y && Y({
|
|
100
|
+
syntheticEvent: n.syntheticEvent,
|
|
101
|
+
nativeEvent: n.nativeEvent,
|
|
102
|
+
value: p(),
|
|
103
103
|
show: l(),
|
|
104
|
-
target:
|
|
105
|
-
}),
|
|
106
|
-
},
|
|
107
|
-
const
|
|
108
|
-
|
|
104
|
+
target: D.current
|
|
105
|
+
}), M.current = void 0, R.current = void 0, g(!1);
|
|
106
|
+
}, $e = (e) => {
|
|
107
|
+
const n = Ue(e.value);
|
|
108
|
+
A(n, e);
|
|
109
109
|
}, J = () => {
|
|
110
|
-
const { popupClass:
|
|
110
|
+
const { popupClass: e, ...n } = C, u = l(), S = p(), z = S && ft(S), L = se(e), K = {
|
|
111
111
|
popupClass: "k-datepicker-popup",
|
|
112
|
-
show:
|
|
113
|
-
anchor:
|
|
114
|
-
className:
|
|
115
|
-
id:
|
|
112
|
+
show: u,
|
|
113
|
+
anchor: d.current,
|
|
114
|
+
className: L,
|
|
115
|
+
id: te,
|
|
116
116
|
anchorAlign: {
|
|
117
117
|
horizontal: "left",
|
|
118
118
|
vertical: "bottom"
|
|
@@ -121,58 +121,58 @@ const de = n.forwardRef((a, fe) => {
|
|
|
121
121
|
horizontal: "left",
|
|
122
122
|
vertical: "top"
|
|
123
123
|
},
|
|
124
|
-
...
|
|
125
|
-
onMouseDownOutside:
|
|
126
|
-
},
|
|
127
|
-
disabled:
|
|
128
|
-
value:
|
|
129
|
-
min:
|
|
130
|
-
max:
|
|
131
|
-
weekNumber:
|
|
132
|
-
focusedDate:
|
|
133
|
-
className:
|
|
134
|
-
navigation: !
|
|
135
|
-
onChange:
|
|
136
|
-
},
|
|
137
|
-
return
|
|
124
|
+
...n,
|
|
125
|
+
onMouseDownOutside: Ye
|
|
126
|
+
}, ae = {
|
|
127
|
+
disabled: m,
|
|
128
|
+
value: z,
|
|
129
|
+
min: y,
|
|
130
|
+
max: w,
|
|
131
|
+
weekNumber: Pe,
|
|
132
|
+
focusedDate: xe,
|
|
133
|
+
className: s() ? "k-calendar-lg" : "",
|
|
134
|
+
navigation: !s(),
|
|
135
|
+
onChange: $e
|
|
136
|
+
}, ie = Ke(), ct = qe();
|
|
137
|
+
return s() ? /* @__PURE__ */ o.createElement(ie, { _ref: G, ...ae }) : /* @__PURE__ */ o.createElement(ct, { ...K }, /* @__PURE__ */ o.createElement(ie, { _ref: G, ...ae }));
|
|
138
138
|
}, Q = () => {
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
const { windowWidth:
|
|
139
|
+
P({ focused: !1 }), g(!1);
|
|
140
|
+
}, je = () => {
|
|
141
|
+
const { windowWidth: e = 0 } = v, n = {
|
|
142
142
|
expand: l(),
|
|
143
143
|
onClose: Q,
|
|
144
|
-
title:
|
|
145
|
-
subTitle:
|
|
146
|
-
windowWidth:
|
|
144
|
+
title: Ie,
|
|
145
|
+
subTitle: Ee,
|
|
146
|
+
windowWidth: e
|
|
147
147
|
};
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
const { altKey:
|
|
161
|
-
if (
|
|
162
|
-
|
|
148
|
+
return /* @__PURE__ */ o.createElement(It, { ...n }, /* @__PURE__ */ o.createElement(_t, null, J()));
|
|
149
|
+
}, Xe = (e) => {
|
|
150
|
+
A(e.value, e);
|
|
151
|
+
}, Ze = () => {
|
|
152
|
+
P({ focused: !0 });
|
|
153
|
+
}, Ge = () => {
|
|
154
|
+
g(!l());
|
|
155
|
+
}, F = () => {
|
|
156
|
+
m || (h.current = !0, g(!l()));
|
|
157
|
+
}, Je = (e) => {
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
}, Qe = (e) => {
|
|
160
|
+
const { altKey: n, keyCode: u } = e;
|
|
161
|
+
if (u === k.esc && l()) {
|
|
162
|
+
h.current = !0, g(!1);
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
n && (u === k.up || u === k.down) && (e.preventDefault(), e.stopPropagation(), h.current = u === k.up, g(u === k.down));
|
|
166
|
+
}, D = o.useRef(null), d = o.useRef(null), c = o.useRef(null), f = o.useRef(null);
|
|
167
|
+
o.useImperativeHandle(
|
|
168
|
+
D,
|
|
169
169
|
() => ({
|
|
170
170
|
props: a,
|
|
171
171
|
get element() {
|
|
172
|
-
return
|
|
172
|
+
return d.current;
|
|
173
173
|
},
|
|
174
174
|
get calendar() {
|
|
175
|
-
return
|
|
175
|
+
return f.current;
|
|
176
176
|
},
|
|
177
177
|
get dateInput() {
|
|
178
178
|
return c.current;
|
|
@@ -184,222 +184,250 @@ const de = n.forwardRef((a, fe) => {
|
|
|
184
184
|
return l();
|
|
185
185
|
},
|
|
186
186
|
get validity() {
|
|
187
|
-
return
|
|
187
|
+
return N();
|
|
188
188
|
},
|
|
189
189
|
get value() {
|
|
190
|
-
return
|
|
190
|
+
return p();
|
|
191
191
|
},
|
|
192
192
|
get mobileMode() {
|
|
193
|
-
return
|
|
193
|
+
return s();
|
|
194
194
|
},
|
|
195
|
-
togglePopup:
|
|
195
|
+
togglePopup: Ge,
|
|
196
196
|
// Hidden Methods but still accessible
|
|
197
|
-
focus:
|
|
197
|
+
focus: He
|
|
198
198
|
})
|
|
199
|
-
),
|
|
200
|
-
const
|
|
201
|
-
value:
|
|
202
|
-
show:
|
|
199
|
+
), o.useImperativeHandle(pe, () => D.current);
|
|
200
|
+
const M = o.useRef(void 0), R = o.useRef(void 0), et = o.useRef(null), h = o.useRef(!1), V = o.useRef(!1), O = o.useRef(null), [v, tt] = o.useState({
|
|
201
|
+
value: ve,
|
|
202
|
+
show: he,
|
|
203
203
|
focused: !1
|
|
204
|
-
}), [,
|
|
205
|
-
|
|
204
|
+
}), [, nt] = o.useReducer((e) => e, !0), ee = a.name || _ || void 0, ot = o.useCallback(
|
|
205
|
+
(e) => {
|
|
206
|
+
if (m)
|
|
207
|
+
return;
|
|
208
|
+
let n = null;
|
|
209
|
+
if (e != null) {
|
|
210
|
+
if (e instanceof Date)
|
|
211
|
+
n = e;
|
|
212
|
+
else if (typeof e == "string" || typeof e == "number") {
|
|
213
|
+
const u = new Date(e);
|
|
214
|
+
isNaN(u.getTime()) || (n = u);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (n && de(n, y, w)) {
|
|
218
|
+
const u = {
|
|
219
|
+
target: d.current,
|
|
220
|
+
currentTarget: d.current
|
|
221
|
+
};
|
|
222
|
+
A(n, { syntheticEvent: u });
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
[m, y, w]
|
|
226
|
+
);
|
|
227
|
+
vt(d, {
|
|
228
|
+
fieldName: ee,
|
|
229
|
+
onValueChange: ot,
|
|
230
|
+
enabled: !!ee
|
|
231
|
+
});
|
|
232
|
+
const P = (e) => {
|
|
233
|
+
tt((n) => ({ ...n, ...e }));
|
|
206
234
|
};
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}, 300), c.current && c.current.element && !l() &&
|
|
211
|
-
}),
|
|
212
|
-
var
|
|
213
|
-
return
|
|
214
|
-
var
|
|
215
|
-
clearTimeout(
|
|
235
|
+
o.useEffect(() => {
|
|
236
|
+
f.current && f.current.element && l() && !V.current && f.current.element.focus({ preventScroll: !0 }), s() && l() && !V.current && setTimeout(() => {
|
|
237
|
+
f.current && f.current.element && f.current.element.focus({ preventScroll: !0 });
|
|
238
|
+
}, 300), c.current && c.current.element && !l() && h.current && c.current.element.focus({ preventScroll: !0 }), V.current = l(), h.current = !1;
|
|
239
|
+
}), o.useEffect(() => {
|
|
240
|
+
var e;
|
|
241
|
+
return O.current = ue && window.ResizeObserver && new window.ResizeObserver((n) => We(n)), l() && nt(), (e = x()) != null && e.body && O.current && O.current.observe(x().body), () => {
|
|
242
|
+
var n;
|
|
243
|
+
clearTimeout(et.current), (n = x()) != null && n.body && O.current && O.current.disconnect();
|
|
216
244
|
};
|
|
217
245
|
}, []);
|
|
218
|
-
const
|
|
219
|
-
disabled:
|
|
220
|
-
format:
|
|
221
|
-
formatPlaceholder:
|
|
222
|
-
id:
|
|
223
|
-
ariaLabelledBy:
|
|
224
|
-
ariaDescribedBy:
|
|
225
|
-
ariaLabel:
|
|
226
|
-
max:
|
|
227
|
-
min:
|
|
246
|
+
const te = _ + "-popup-id", rt = J(), at = ze(), it = p(), lt = Le(), ut = je(), ne = !q || N().valid, oe = ge.toLanguageString(fe, kt[fe]), st = {
|
|
247
|
+
disabled: m,
|
|
248
|
+
format: De,
|
|
249
|
+
formatPlaceholder: Be,
|
|
250
|
+
id: Ne,
|
|
251
|
+
ariaLabelledBy: Ae,
|
|
252
|
+
ariaDescribedBy: Fe,
|
|
253
|
+
ariaLabel: _e,
|
|
254
|
+
max: w,
|
|
255
|
+
min: y,
|
|
228
256
|
name: a.name,
|
|
229
|
-
onChange:
|
|
257
|
+
onChange: Xe,
|
|
230
258
|
required: a.required,
|
|
231
259
|
_ref: c,
|
|
232
|
-
tabIndex: l() ? -1 :
|
|
260
|
+
tabIndex: l() ? -1 : Oe,
|
|
233
261
|
title: a.title,
|
|
234
|
-
valid:
|
|
235
|
-
validationMessage:
|
|
236
|
-
validityStyles:
|
|
237
|
-
value:
|
|
262
|
+
valid: N().valid,
|
|
263
|
+
validationMessage: H,
|
|
264
|
+
validityStyles: q,
|
|
265
|
+
value: it,
|
|
238
266
|
label: void 0,
|
|
239
|
-
placeholder:
|
|
267
|
+
placeholder: v.focused ? null : Ve,
|
|
240
268
|
ariaExpanded: l(),
|
|
241
269
|
autoFill: a.autoFill,
|
|
242
|
-
twoDigitYearMax:
|
|
270
|
+
twoDigitYearMax: Se,
|
|
243
271
|
enableMouseWheel: a.enableMouseWheel,
|
|
244
272
|
autoCorrectParts: a.autoCorrectParts,
|
|
245
|
-
autoSwitchParts:
|
|
246
|
-
autoSwitchKeys:
|
|
273
|
+
autoSwitchParts: Me,
|
|
274
|
+
autoSwitchKeys: Re,
|
|
247
275
|
allowCaretMode: a.allowCaretMode,
|
|
248
|
-
inputAttributes:
|
|
249
|
-
},
|
|
250
|
-
|
|
276
|
+
inputAttributes: Te
|
|
277
|
+
}, re = /* @__PURE__ */ o.createElement(
|
|
278
|
+
bt,
|
|
251
279
|
{
|
|
252
|
-
onFocus:
|
|
253
|
-
onBlur:
|
|
280
|
+
onFocus: Ze,
|
|
281
|
+
onBlur: s() ? void 0 : Q,
|
|
254
282
|
onSyncBlur: a.onBlur,
|
|
255
283
|
onSyncFocus: a.onFocus
|
|
256
284
|
},
|
|
257
|
-
(
|
|
285
|
+
(e) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
|
|
258
286
|
"span",
|
|
259
287
|
{
|
|
260
|
-
...a.label ? {} :
|
|
261
|
-
ref:
|
|
262
|
-
className:
|
|
288
|
+
...a.label ? {} : X,
|
|
289
|
+
ref: d,
|
|
290
|
+
className: se(
|
|
263
291
|
"k-input",
|
|
264
292
|
"k-datepicker",
|
|
265
293
|
{
|
|
266
|
-
[`k-input-${
|
|
267
|
-
[`k-rounded-${
|
|
268
|
-
[`k-input-${
|
|
269
|
-
"k-invalid": !
|
|
270
|
-
"k-required":
|
|
271
|
-
"k-disabled":
|
|
294
|
+
[`k-input-${ce.sizeMap[I] || I}`]: I,
|
|
295
|
+
[`k-rounded-${ce.roundedMap[E] || E}`]: E,
|
|
296
|
+
[`k-input-${B}`]: B,
|
|
297
|
+
"k-invalid": !ne,
|
|
298
|
+
"k-required": Z(),
|
|
299
|
+
"k-disabled": m
|
|
272
300
|
},
|
|
273
301
|
a.className
|
|
274
302
|
),
|
|
275
|
-
onKeyDown:
|
|
303
|
+
onKeyDown: Qe,
|
|
276
304
|
style: { width: a.width },
|
|
277
|
-
onFocus:
|
|
278
|
-
onBlur:
|
|
279
|
-
onClick:
|
|
305
|
+
onFocus: s() ? F : e.onFocus,
|
|
306
|
+
onBlur: e.onBlur,
|
|
307
|
+
onClick: s() ? F : void 0
|
|
280
308
|
},
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
|
|
309
|
+
/* @__PURE__ */ o.createElement(
|
|
310
|
+
at,
|
|
283
311
|
{
|
|
284
312
|
_ref: c,
|
|
285
313
|
ariaRole: "combobox",
|
|
286
314
|
ariaExpanded: l(),
|
|
287
|
-
ariaControls:
|
|
288
|
-
autoFocus:
|
|
289
|
-
...
|
|
315
|
+
ariaControls: te,
|
|
316
|
+
autoFocus: ke,
|
|
317
|
+
...st
|
|
290
318
|
}
|
|
291
319
|
),
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
|
|
320
|
+
/* @__PURE__ */ o.createElement(
|
|
321
|
+
lt,
|
|
294
322
|
{
|
|
295
323
|
type: "button",
|
|
296
324
|
icon: "calendar",
|
|
297
|
-
svgIcon:
|
|
298
|
-
title:
|
|
325
|
+
svgIcon: wt,
|
|
326
|
+
title: oe,
|
|
299
327
|
className: "k-input-button",
|
|
300
|
-
onClick:
|
|
301
|
-
"aria-label":
|
|
302
|
-
fillMode:
|
|
303
|
-
onMouseDown:
|
|
328
|
+
onClick: s() ? void 0 : F,
|
|
329
|
+
"aria-label": oe,
|
|
330
|
+
fillMode: B,
|
|
331
|
+
onMouseDown: Je
|
|
304
332
|
}
|
|
305
333
|
),
|
|
306
|
-
!
|
|
307
|
-
),
|
|
334
|
+
!s() && rt
|
|
335
|
+
), s() && ut)
|
|
308
336
|
);
|
|
309
|
-
return a.label ? /* @__PURE__ */
|
|
310
|
-
|
|
337
|
+
return a.label ? /* @__PURE__ */ o.createElement(
|
|
338
|
+
St,
|
|
311
339
|
{
|
|
312
340
|
dateInput: c,
|
|
313
341
|
label: a.label,
|
|
314
|
-
editorId:
|
|
315
|
-
editorValid:
|
|
316
|
-
editorDisabled:
|
|
317
|
-
children:
|
|
342
|
+
editorId: _,
|
|
343
|
+
editorValid: ne,
|
|
344
|
+
editorDisabled: m,
|
|
345
|
+
children: re,
|
|
318
346
|
style: { width: a.width },
|
|
319
|
-
...
|
|
347
|
+
...X
|
|
320
348
|
}
|
|
321
|
-
) :
|
|
349
|
+
) : re;
|
|
322
350
|
});
|
|
323
|
-
|
|
324
|
-
className:
|
|
325
|
-
defaultShow:
|
|
326
|
-
defaultValue:
|
|
327
|
-
disabled:
|
|
328
|
-
focusedDate:
|
|
329
|
-
format:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
skeleton: r(
|
|
333
|
-
pattern: r(
|
|
334
|
-
date: r(
|
|
335
|
-
time: r(
|
|
336
|
-
datetime: r(
|
|
337
|
-
era: r(
|
|
338
|
-
year: r(
|
|
339
|
-
month: r(
|
|
340
|
-
day: r(
|
|
341
|
-
weekday: r(
|
|
342
|
-
hour: r(
|
|
343
|
-
hour12: r(
|
|
344
|
-
minute: r(
|
|
345
|
-
second: r(
|
|
346
|
-
timeZoneName: r(
|
|
351
|
+
me.propTypes = {
|
|
352
|
+
className: t.string,
|
|
353
|
+
defaultShow: t.bool,
|
|
354
|
+
defaultValue: t.instanceOf(Date),
|
|
355
|
+
disabled: t.bool,
|
|
356
|
+
focusedDate: t.instanceOf(Date),
|
|
357
|
+
format: t.oneOfType([
|
|
358
|
+
t.string,
|
|
359
|
+
t.shape({
|
|
360
|
+
skeleton: r(t.string),
|
|
361
|
+
pattern: r(t.string),
|
|
362
|
+
date: r(t.oneOf(["short", "medium", "long", "full"])),
|
|
363
|
+
time: r(t.oneOf(["short", "medium", "long", "full"])),
|
|
364
|
+
datetime: r(t.oneOf(["short", "medium", "long", "full"])),
|
|
365
|
+
era: r(t.oneOf(["narrow", "short", "long"])),
|
|
366
|
+
year: r(t.oneOf(["numeric", "2-digit"])),
|
|
367
|
+
month: r(t.oneOf(["numeric", "2-digit", "narrow", "short", "long"])),
|
|
368
|
+
day: r(t.oneOf(["numeric", "2-digit"])),
|
|
369
|
+
weekday: r(t.oneOf(["narrow", "short", "long"])),
|
|
370
|
+
hour: r(t.oneOf(["numeric", "2-digit"])),
|
|
371
|
+
hour12: r(t.bool),
|
|
372
|
+
minute: r(t.oneOf(["numeric", "2-digit"])),
|
|
373
|
+
second: r(t.oneOf(["numeric", "2-digit"])),
|
|
374
|
+
timeZoneName: r(t.oneOf(["short", "long"]))
|
|
347
375
|
})
|
|
348
376
|
]),
|
|
349
|
-
formatPlaceholder:
|
|
377
|
+
formatPlaceholder: t.oneOfType([
|
|
350
378
|
r(
|
|
351
|
-
|
|
379
|
+
t.oneOf(["wide", "narrow", "short", "formatPattern"])
|
|
352
380
|
),
|
|
353
|
-
|
|
354
|
-
year: r(
|
|
355
|
-
month: r(
|
|
356
|
-
day: r(
|
|
357
|
-
hour: r(
|
|
358
|
-
minute: r(
|
|
359
|
-
second: r(
|
|
381
|
+
t.shape({
|
|
382
|
+
year: r(t.string),
|
|
383
|
+
month: r(t.string),
|
|
384
|
+
day: r(t.string),
|
|
385
|
+
hour: r(t.string),
|
|
386
|
+
minute: r(t.string),
|
|
387
|
+
second: r(t.string)
|
|
360
388
|
})
|
|
361
389
|
]),
|
|
362
|
-
id:
|
|
363
|
-
ariaLabelledBy:
|
|
364
|
-
ariaDescribedBy:
|
|
365
|
-
ariaLabel:
|
|
366
|
-
min:
|
|
367
|
-
max:
|
|
368
|
-
name:
|
|
369
|
-
popupSettings:
|
|
370
|
-
animate: r(
|
|
371
|
-
appendTo: r(
|
|
372
|
-
popupClass: r(
|
|
390
|
+
id: t.string,
|
|
391
|
+
ariaLabelledBy: t.string,
|
|
392
|
+
ariaDescribedBy: t.string,
|
|
393
|
+
ariaLabel: t.string,
|
|
394
|
+
min: t.instanceOf(Date),
|
|
395
|
+
max: t.instanceOf(Date),
|
|
396
|
+
name: t.string,
|
|
397
|
+
popupSettings: t.shape({
|
|
398
|
+
animate: r(t.bool),
|
|
399
|
+
appendTo: r(t.any),
|
|
400
|
+
popupClass: r(t.string)
|
|
373
401
|
}),
|
|
374
|
-
show:
|
|
375
|
-
tabIndex:
|
|
376
|
-
title:
|
|
377
|
-
value:
|
|
378
|
-
weekNumber:
|
|
379
|
-
width:
|
|
380
|
-
validationMessage:
|
|
381
|
-
required:
|
|
382
|
-
valid:
|
|
383
|
-
size:
|
|
384
|
-
rounded:
|
|
385
|
-
fillMode:
|
|
386
|
-
adaptive:
|
|
387
|
-
adaptiveTitle:
|
|
388
|
-
adaptiveSubtitle:
|
|
389
|
-
autoFocus:
|
|
390
|
-
inputAttributes:
|
|
402
|
+
show: t.bool,
|
|
403
|
+
tabIndex: t.number,
|
|
404
|
+
title: t.string,
|
|
405
|
+
value: t.instanceOf(Date),
|
|
406
|
+
weekNumber: t.bool,
|
|
407
|
+
width: t.oneOfType([t.number, t.string]),
|
|
408
|
+
validationMessage: t.string,
|
|
409
|
+
required: t.bool,
|
|
410
|
+
valid: t.bool,
|
|
411
|
+
size: t.oneOf(["small", "medium", "large"]),
|
|
412
|
+
rounded: t.oneOf(["small", "medium", "large", "full", "none"]),
|
|
413
|
+
fillMode: t.oneOf(["solid", "flat", "outline"]),
|
|
414
|
+
adaptive: t.bool,
|
|
415
|
+
adaptiveTitle: t.string,
|
|
416
|
+
adaptiveSubtitle: t.string,
|
|
417
|
+
autoFocus: t.bool,
|
|
418
|
+
inputAttributes: t.object
|
|
391
419
|
};
|
|
392
420
|
const i = {
|
|
393
421
|
defaultShow: !1,
|
|
394
422
|
defaultValue: null,
|
|
395
|
-
dateInput:
|
|
396
|
-
calendar:
|
|
397
|
-
toggleButton:
|
|
398
|
-
popup:
|
|
423
|
+
dateInput: yt,
|
|
424
|
+
calendar: Ct,
|
|
425
|
+
toggleButton: Rt,
|
|
426
|
+
popup: dt,
|
|
399
427
|
disabled: !1,
|
|
400
428
|
format: "d",
|
|
401
|
-
max:
|
|
402
|
-
min:
|
|
429
|
+
max: Ot,
|
|
430
|
+
min: Dt,
|
|
403
431
|
popupSettings: {},
|
|
404
432
|
tabIndex: 0,
|
|
405
433
|
weekNumber: !1,
|
|
@@ -408,10 +436,10 @@ const i = {
|
|
|
408
436
|
rounded: void 0,
|
|
409
437
|
fillMode: void 0,
|
|
410
438
|
autoFocus: !1
|
|
411
|
-
},
|
|
412
|
-
|
|
439
|
+
}, Et = mt();
|
|
440
|
+
me.displayName = "KendoReactDatePicker";
|
|
413
441
|
export {
|
|
414
|
-
|
|
415
|
-
|
|
442
|
+
me as DatePicker,
|
|
443
|
+
Et as DatePickerPropsContext,
|
|
416
444
|
i as datePickerDefaultProps
|
|
417
445
|
};
|