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