@progress/kendo-react-dateinputs 12.0.2-develop.1 → 12.0.2-develop.2
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 +36 -39
- package/daterangepicker/DateRangePicker.mjs +3 -0
- package/datetimepicker/DateTimePicker.mjs +1 -1
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/index.d.mts +231 -129
- package/index.d.ts +231 -129
- package/index.js +1 -1
- package/index.mjs +64 -66
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/timepicker/TimePicker.mjs +1 -1
- package/common/PickerWrap.js +0 -8
- package/common/PickerWrap.mjs +0 -18
package/datepicker/DatePicker.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("react"),e=require("prop-types"),ot=require("@progress/kendo-react-popup"),W=require("@progress/kendo-date-math"),i=require("@progress/kendo-react-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("react"),e=require("prop-types"),ot=require("@progress/kendo-react-popup"),W=require("@progress/kendo-date-math"),i=require("@progress/kendo-react-common"),lt=require("@progress/kendo-svg-icons"),rt=require("../dateinput/DateInput.js"),ut=require("../calendar/components/Calendar.js"),o=require("../utils.js"),j=require("../messages/index.js"),it=require("@progress/kendo-react-intl"),st=require("./ToggleButton.js"),ct=require("../hooks/usePickerFloatingLabel.js"),dt=require("@progress/kendo-react-layout"),ft=require("../common/AdaptiveMode.js");function mt(n){const v=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const M=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(v,m,M.get?M:{enumerable:!0,get:()=>n[m]})}}return v.default=n,Object.freeze(v)}const a=mt(at),U=a.forwardRef((n,v)=>{const m=i.useId(n.id),M=it.useLocalization(),w=i.useAdaptiveModeContext(),{defaultShow:se=r.defaultShow,defaultValue:ce=r.defaultValue,dateInput:de=r.dateInput,calendar:fe=r.calendar,toggleButton:me=r.toggleButton,popup:ge=r.popup,disabled:y=r.disabled,format:pe=r.format,max:_=r.max,min:T=r.min,popupSettings:D=r.popupSettings,tabIndex:be=r.tabIndex,weekNumber:he=r.weekNumber,validityStyles:H=r.validityStyles,size:B=r.size,rounded:E=r.rounded,fillMode:x=r.fillMode,autoFocus:ve=r.autoFocus,show:Y,autoSwitchParts:we,autoSwitchKeys:ye,twoDigitYearMax:De,ariaLabel:Ce,adaptive:gt,adaptiveTitle:ke=n.label||void 0,adaptiveSubtitle:Oe,formatPlaceholder:Pe,inputAttributes:Me,validationMessage:$,visited:pt,value:q,touched:bt,modified:ht,_adaptiveMode:vt=w,valid:X,focusedDate:Re,id:Se,ariaLabelledBy:Ie,ariaDescribedBy:_e,placeholder:Te,...Z}=i.usePropsContext(ie,n),A=()=>{if(i.canUseDOM)return k.current&&k.current.ownerDocument||window.document},s=()=>!!(h.windowWidth&&w&&h.windowWidth<=(w==null?void 0:w.medium)&&n.adaptive),g=()=>{const t=R.current!==void 0?R.current:q!==void 0?q:h.value;return t!==null?W.cloneDate(t):null},u=()=>S.current!==void 0?S.current:Y!==void 0?Y:h.show,Be=()=>de||r.dateInput,Ee=()=>me||r.toggleButton,xe=()=>fe||r.calendar,qe=()=>ge||r.popup,G=()=>n.required!==void 0?n.required:!1,N=()=>{const t=g()||q||null,l=T,c=_,I=o.isInDateRange(t,l,c),z=$!==void 0,L=(!G()||t!=null)&&I,K=X!==void 0?X:L;return{customError:z,rangeOverflow:t&&c.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<l.getTime()||!1,valid:K,valueMissing:t===null}},Ae=t=>{for(const l of t)P({windowWidth:l.target.clientWidth})},Ne=()=>{d.current&&d.current.focus()},J=t=>{f.current=t},p=t=>{u()!==t&&(P({show:t}),t&&n.onOpen&&n.onOpen.call(void 0,{target:C.current}),!t&&n.onClose&&n.onClose.call(void 0,{target:C.current}))},Fe=t=>{const l=g();return l&&t?o.setTime(t,l):t},Ve=t=>{D!=null&&D.onMouseDownOutside&&D.onMouseDownOutside.call(void 0,t)},Q=(t,l)=>{P({value:W.cloneDate(t||void 0)}),R.current=t,S.current=!1,s()||(b.current=!0),n.onChange&&n.onChange.call(void 0,{syntheticEvent:l.syntheticEvent,nativeEvent:l.nativeEvent,value:g(),show:u(),target:C.current}),R.current=void 0,S.current=void 0,p(!1)},ze=t=>{const l=Fe(t.value);Q(l,t)},ee=()=>{const{popupClass:t,...l}=D,c=u(),I=g(),z=I&&W.getDate(I),L=i.classNames(t),K={popupClass:"k-datepicker-popup",show:c,anchor:k.current,className:L,id:ne,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...l,onMouseDownOutside:Ve},re={disabled:y,value:z,min:T,max:_,weekNumber:he,focusedDate:Re,className:s()?"k-calendar-lg":"",navigation:!s(),onChange:ze},ue=xe(),nt=qe();return s()?a.createElement(ue,{_ref:J,...re}):a.createElement(nt,{...K},a.createElement(ue,{_ref:J,...re}))},te=()=>{P({focused:!1}),p(!1)},Le=()=>{const{windowWidth:t=0}=h,l={expand:u(),onClose:te,title:ke,subTitle:Oe,windowWidth:t};return a.createElement(ft.AdaptiveMode,{...l},a.createElement(dt.ActionSheetContent,null,ee()))},Ke=t=>{Q(t.value,t)},We=()=>{P({focused:!0})},je=()=>{p(!u())},F=()=>{y||(b.current=!0,p(!u()))},Ue=t=>{t.preventDefault()},He=t=>{const{altKey:l,keyCode:c}=t;if(c===i.Keys.esc&&u()){b.current=!0,p(!1);return}l&&(c===i.Keys.up||c===i.Keys.down)&&(t.preventDefault(),t.stopPropagation(),b.current=c===i.Keys.up,p(c===i.Keys.down))},C=a.useRef(null),k=a.useRef(null),d=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(C,()=>({props:n,get element(){return k.current},get calendar(){return f.current},get dateInput(){return d.current},get name(){return n.name},get show(){return u()},get validity(){return N()},get value(){return g()},get mobileMode(){return s()},togglePopup:je,focus:Ne})),a.useImperativeHandle(v,()=>C.current);const R=a.useRef(void 0),S=a.useRef(void 0),Ye=a.useRef(null),b=a.useRef(!1),V=a.useRef(!1),O=a.useRef(null),[h,$e]=a.useState({value:ce,show:se,focused:!1}),[,Xe]=a.useReducer(t=>t,!0),P=t=>{$e(l=>({...l,...t}))};a.useEffect(()=>{f.current&&f.current.element&&u()&&!V.current&&f.current.element.focus({preventScroll:!0}),s()&&u()&&!V.current&&setTimeout(()=>{f.current&&f.current.element&&f.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!u()&&b.current&&d.current.element.focus({preventScroll:!0}),V.current=u(),b.current=!1}),a.useEffect(()=>{var t;return O.current=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(l=>Ae(l)),u()&&Xe(),(t=A())!=null&&t.body&&O.current&&O.current.observe(A().body),()=>{var l;clearTimeout(Ye.current),(l=A())!=null&&l.body&&O.current&&O.current.disconnect()}},[]);const ne=m+"-popup-id",Ze=ee(),Ge=Be(),Je=g(),Qe=Ee(),et=Le(),ae=!H||N().valid,oe=M.toLanguageString(j.toggleCalendar,j.messages[j.toggleCalendar]),tt={disabled:y,format:pe,formatPlaceholder:Pe,id:Se,ariaLabelledBy:Ie,ariaDescribedBy:_e,ariaLabel:Ce,max:_,min:T,name:n.name,onChange:Ke,required:n.required,_ref:d,tabIndex:u()?-1:be,title:n.title,valid:N().valid,validationMessage:$,validityStyles:H,value:Je,label:void 0,placeholder:h.focused?null:Te,ariaExpanded:u(),size:null,fillMode:null,rounded:null,autoFill:n.autoFill,twoDigitYearMax:De,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:we,autoSwitchKeys:ye,allowCaretMode:n.allowCaretMode,inputAttributes:Me},le=a.createElement(i.AsyncFocusBlur,{onFocus:We,onBlur:s()?void 0:te,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},t=>a.createElement(a.Fragment,null,a.createElement("span",{...n.label?{}:Z,ref:k,className:i.classNames("k-input","k-datepicker",{[`k-input-${i.kendoThemeMaps.sizeMap[B]||B}`]:B,[`k-rounded-${i.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-input-${x}`]:x,"k-invalid":!ae,"k-required":G(),"k-disabled":y},n.className),onKeyDown:He,style:{width:n.width},onFocus:s()?F:t.onFocus,onBlur:t.onBlur,onClick:s()?F:void 0},a.createElement(Ge,{_ref:d,ariaRole:"combobox",ariaExpanded:u(),ariaControls:ne,autoFocus:ve,...tt}),a.createElement(Qe,{type:"button",icon:"calendar",svgIcon:lt.calendarIcon,title:oe,className:"k-input-button",rounded:null,onClick:s()?void 0:F,"aria-label":oe,fillMode:x,onMouseDown:Ue}),!s()&&Ze),s()&&et));return n.label?a.createElement(ct.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:m,editorValid:ae,editorDisabled:y,children:le,style:{width:n.width},...Z}):le});U.propTypes={className:e.string,defaultShow:e.bool,defaultValue:e.instanceOf(Date),disabled:e.bool,focusedDate:e.instanceOf(Date),format:e.oneOfType([e.string,e.shape({skeleton:o.nullable(e.string),pattern:o.nullable(e.string),date:o.nullable(e.oneOf(["short","medium","long","full"])),time:o.nullable(e.oneOf(["short","medium","long","full"])),datetime:o.nullable(e.oneOf(["short","medium","long","full"])),era:o.nullable(e.oneOf(["narrow","short","long"])),year:o.nullable(e.oneOf(["numeric","2-digit"])),month:o.nullable(e.oneOf(["numeric","2-digit","narrow","short","long"])),day:o.nullable(e.oneOf(["numeric","2-digit"])),weekday:o.nullable(e.oneOf(["narrow","short","long"])),hour:o.nullable(e.oneOf(["numeric","2-digit"])),hour12:o.nullable(e.bool),minute:o.nullable(e.oneOf(["numeric","2-digit"])),second:o.nullable(e.oneOf(["numeric","2-digit"])),timeZoneName:o.nullable(e.oneOf(["short","long"]))})]),formatPlaceholder:e.oneOfType([o.nullable(e.oneOf(["wide","narrow","short","formatPattern"])),e.shape({year:o.nullable(e.string),month:o.nullable(e.string),day:o.nullable(e.string),hour:o.nullable(e.string),minute:o.nullable(e.string),second:o.nullable(e.string)})]),id:e.string,ariaLabelledBy:e.string,ariaDescribedBy:e.string,ariaLabel:e.string,min:e.instanceOf(Date),max:e.instanceOf(Date),name:e.string,popupSettings:e.shape({animate:o.nullable(e.bool),appendTo:o.nullable(e.any),popupClass:o.nullable(e.string)}),show:e.bool,tabIndex:e.number,title:e.string,value:e.instanceOf(Date),weekNumber:e.bool,width:e.oneOfType([e.number,e.string]),validationMessage:e.string,required:e.bool,valid:e.bool,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),adaptive:e.bool,adaptiveTitle:e.string,adaptiveSubtitle:e.string,autoFocus:e.bool,inputAttributes:e.object};const r={defaultShow:!1,defaultValue:null,dateInput:rt.DateInput,calendar:ut.Calendar,toggleButton:st.ToggleButton,popup:ot.Popup,disabled:!1,format:"d",max:o.MAX_DATE,min:o.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1},ie=i.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=ie;exports.datePickerDefaultProps=r;
|
|
@@ -9,7 +9,7 @@ import * as o from "react";
|
|
|
9
9
|
import e from "prop-types";
|
|
10
10
|
import { Popup as at } from "@progress/kendo-react-popup";
|
|
11
11
|
import { cloneDate as oe, getDate as lt } from "@progress/kendo-date-math";
|
|
12
|
-
import { useId as it, useAdaptiveModeContext as ut, usePropsContext as st, canUseDOM as re, AsyncFocusBlur as ct, classNames as ae, kendoThemeMaps as le, createPropsContext as dt, Keys as
|
|
12
|
+
import { useId as it, useAdaptiveModeContext as ut, usePropsContext as st, canUseDOM as re, AsyncFocusBlur as ct, classNames as ae, kendoThemeMaps as le, createPropsContext as dt, Keys as O } from "@progress/kendo-react-common";
|
|
13
13
|
import { calendarIcon as ft } from "@progress/kendo-svg-icons";
|
|
14
14
|
import { DateInput as mt } from "../dateinput/DateInput.mjs";
|
|
15
15
|
import { Calendar as pt } from "../calendar/components/Calendar.mjs";
|
|
@@ -17,8 +17,7 @@ import { nullable as a, MAX_DATE as gt, MIN_DATE as ht, isInDateRange as vt, set
|
|
|
17
17
|
import { toggleCalendar as ie, messages as wt } from "../messages/index.mjs";
|
|
18
18
|
import { useLocalization as yt } from "@progress/kendo-react-intl";
|
|
19
19
|
import { ToggleButton as Ct } from "./ToggleButton.mjs";
|
|
20
|
-
import {
|
|
21
|
-
import { PickerFloatingLabel as kt } from "../hooks/usePickerFloatingLabel.mjs";
|
|
20
|
+
import { PickerFloatingLabel as Dt } from "../hooks/usePickerFloatingLabel.mjs";
|
|
22
21
|
import { ActionSheetContent as Ot } from "@progress/kendo-react-layout";
|
|
23
22
|
import { AdaptiveMode as Mt } from "../common/AdaptiveMode.mjs";
|
|
24
23
|
const ue = o.forwardRef((n, se) => {
|
|
@@ -29,7 +28,6 @@ const ue = o.forwardRef((n, se) => {
|
|
|
29
28
|
calendar: pe = l.calendar,
|
|
30
29
|
toggleButton: ge = l.toggleButton,
|
|
31
30
|
popup: he = l.popup,
|
|
32
|
-
pickerWrap: Rt = l.pickerWrap,
|
|
33
31
|
disabled: v = l.disabled,
|
|
34
32
|
format: ve = l.format,
|
|
35
33
|
max: R = l.max,
|
|
@@ -37,27 +35,27 @@ const ue = o.forwardRef((n, se) => {
|
|
|
37
35
|
popupSettings: b = l.popupSettings,
|
|
38
36
|
tabIndex: be = l.tabIndex,
|
|
39
37
|
weekNumber: we = l.weekNumber,
|
|
40
|
-
validityStyles:
|
|
38
|
+
validityStyles: K = l.validityStyles,
|
|
41
39
|
size: S = l.size,
|
|
42
40
|
rounded: _ = l.rounded,
|
|
43
41
|
fillMode: E = l.fillMode,
|
|
44
42
|
autoFocus: ye = l.autoFocus,
|
|
45
|
-
show:
|
|
43
|
+
show: q,
|
|
46
44
|
autoSwitchParts: Ce,
|
|
47
45
|
autoSwitchKeys: De,
|
|
48
|
-
twoDigitYearMax:
|
|
49
|
-
ariaLabel:
|
|
50
|
-
adaptive:
|
|
51
|
-
adaptiveTitle:
|
|
46
|
+
twoDigitYearMax: Oe,
|
|
47
|
+
ariaLabel: Me,
|
|
48
|
+
adaptive: Pt,
|
|
49
|
+
adaptiveTitle: ke = n.label || void 0,
|
|
52
50
|
adaptiveSubtitle: Pe,
|
|
53
51
|
formatPlaceholder: Re,
|
|
54
52
|
inputAttributes: Ie,
|
|
55
|
-
validationMessage:
|
|
56
|
-
visited:
|
|
53
|
+
validationMessage: W,
|
|
54
|
+
visited: Rt,
|
|
57
55
|
value: B,
|
|
58
|
-
touched:
|
|
59
|
-
modified:
|
|
60
|
-
_adaptiveMode:
|
|
56
|
+
touched: It,
|
|
57
|
+
modified: St,
|
|
58
|
+
_adaptiveMode: _t = h,
|
|
61
59
|
valid: H,
|
|
62
60
|
focusedDate: Se,
|
|
63
61
|
id: _e,
|
|
@@ -65,14 +63,14 @@ const ue = o.forwardRef((n, se) => {
|
|
|
65
63
|
ariaDescribedBy: Be,
|
|
66
64
|
placeholder: xe,
|
|
67
65
|
...U
|
|
68
|
-
} = st(
|
|
66
|
+
} = st(kt, n), x = () => {
|
|
69
67
|
if (re)
|
|
70
68
|
return y.current && y.current.ownerDocument || window.document;
|
|
71
69
|
}, u = () => !!(g.windowWidth && h && g.windowWidth <= (h == null ? void 0 : h.medium) && n.adaptive), f = () => {
|
|
72
|
-
const t =
|
|
70
|
+
const t = M.current !== void 0 ? M.current : B !== void 0 ? B : g.value;
|
|
73
71
|
return t !== null ? oe(t) : null;
|
|
74
|
-
}, i = () =>
|
|
75
|
-
const t = f() || B || null, r = I, s = R, P = vt(t, r, s), F =
|
|
72
|
+
}, i = () => k.current !== void 0 ? k.current : q !== void 0 ? q : g.show, Te = () => me || l.dateInput, Ae = () => ge || l.toggleButton, Ve = () => pe || l.calendar, Fe = () => he || l.popup, Y = () => n.required !== void 0 ? n.required : !1, T = () => {
|
|
73
|
+
const t = f() || B || null, r = I, s = R, P = vt(t, r, s), F = W !== void 0, N = (!Y() || t != null) && P, z = H !== void 0 ? H : N;
|
|
76
74
|
return {
|
|
77
75
|
customError: F,
|
|
78
76
|
rangeOverflow: t && s.getTime() < t.getTime() || !1,
|
|
@@ -92,17 +90,17 @@ const ue = o.forwardRef((n, se) => {
|
|
|
92
90
|
}, Le = (t) => {
|
|
93
91
|
const r = f();
|
|
94
92
|
return r && t ? bt(t, r) : t;
|
|
95
|
-
},
|
|
93
|
+
}, Ke = (t) => {
|
|
96
94
|
b != null && b.onMouseDownOutside && b.onMouseDownOutside.call(void 0, t);
|
|
97
95
|
}, j = (t, r) => {
|
|
98
|
-
D({ value: oe(t || void 0) }),
|
|
96
|
+
D({ value: oe(t || void 0) }), M.current = t, k.current = !1, u() || (p.current = !0), n.onChange && n.onChange.call(void 0, {
|
|
99
97
|
syntheticEvent: r.syntheticEvent,
|
|
100
98
|
nativeEvent: r.nativeEvent,
|
|
101
99
|
value: f(),
|
|
102
100
|
show: i(),
|
|
103
101
|
target: w.current
|
|
104
|
-
}),
|
|
105
|
-
},
|
|
102
|
+
}), M.current = void 0, k.current = void 0, m(!1);
|
|
103
|
+
}, qe = (t) => {
|
|
106
104
|
const r = Le(t.value);
|
|
107
105
|
j(r, t);
|
|
108
106
|
}, X = () => {
|
|
@@ -121,7 +119,7 @@ const ue = o.forwardRef((n, se) => {
|
|
|
121
119
|
vertical: "top"
|
|
122
120
|
},
|
|
123
121
|
...r,
|
|
124
|
-
onMouseDownOutside:
|
|
122
|
+
onMouseDownOutside: Ke
|
|
125
123
|
}, te = {
|
|
126
124
|
disabled: v,
|
|
127
125
|
value: F,
|
|
@@ -131,16 +129,16 @@ const ue = o.forwardRef((n, se) => {
|
|
|
131
129
|
focusedDate: Se,
|
|
132
130
|
className: u() ? "k-calendar-lg" : "",
|
|
133
131
|
navigation: !u(),
|
|
134
|
-
onChange:
|
|
132
|
+
onChange: qe
|
|
135
133
|
}, ne = Ve(), rt = Fe();
|
|
136
134
|
return u() ? /* @__PURE__ */ o.createElement(ne, { _ref: $, ...te }) : /* @__PURE__ */ o.createElement(rt, { ...z }, /* @__PURE__ */ o.createElement(ne, { _ref: $, ...te }));
|
|
137
135
|
}, Z = () => {
|
|
138
136
|
D({ focused: !1 }), m(!1);
|
|
139
|
-
},
|
|
137
|
+
}, We = () => {
|
|
140
138
|
const { windowWidth: t = 0 } = g, r = {
|
|
141
139
|
expand: i(),
|
|
142
140
|
onClose: Z,
|
|
143
|
-
title:
|
|
141
|
+
title: ke,
|
|
144
142
|
subTitle: Pe,
|
|
145
143
|
windowWidth: t
|
|
146
144
|
};
|
|
@@ -157,11 +155,11 @@ const ue = o.forwardRef((n, se) => {
|
|
|
157
155
|
t.preventDefault();
|
|
158
156
|
}, je = (t) => {
|
|
159
157
|
const { altKey: r, keyCode: s } = t;
|
|
160
|
-
if (s ===
|
|
158
|
+
if (s === O.esc && i()) {
|
|
161
159
|
p.current = !0, m(!1);
|
|
162
160
|
return;
|
|
163
161
|
}
|
|
164
|
-
r && (s ===
|
|
162
|
+
r && (s === O.up || s === O.down) && (t.preventDefault(), t.stopPropagation(), p.current = s === O.up, m(s === O.down));
|
|
165
163
|
}, w = o.useRef(null), y = o.useRef(null), c = o.useRef(null), d = o.useRef(null);
|
|
166
164
|
o.useImperativeHandle(
|
|
167
165
|
w,
|
|
@@ -196,7 +194,7 @@ const ue = o.forwardRef((n, se) => {
|
|
|
196
194
|
focus: ze
|
|
197
195
|
})
|
|
198
196
|
), o.useImperativeHandle(se, () => w.current);
|
|
199
|
-
const
|
|
197
|
+
const M = o.useRef(void 0), k = o.useRef(void 0), Xe = o.useRef(null), p = o.useRef(!1), V = o.useRef(!1), C = o.useRef(null), [g, Ze] = o.useState({
|
|
200
198
|
value: fe,
|
|
201
199
|
show: de,
|
|
202
200
|
focused: !1
|
|
@@ -214,14 +212,14 @@ const ue = o.forwardRef((n, se) => {
|
|
|
214
212
|
clearTimeout(Xe.current), (r = x()) != null && r.body && C.current && C.current.disconnect();
|
|
215
213
|
};
|
|
216
214
|
}, []);
|
|
217
|
-
const G = L + "-popup-id", Je = X(), Qe = Te(), et = f(), tt = Ae(), nt =
|
|
215
|
+
const G = L + "-popup-id", Je = X(), Qe = Te(), et = f(), tt = Ae(), nt = We(), J = !K || T().valid, Q = ce.toLanguageString(ie, wt[ie]), ot = {
|
|
218
216
|
disabled: v,
|
|
219
217
|
format: ve,
|
|
220
218
|
formatPlaceholder: Re,
|
|
221
219
|
id: _e,
|
|
222
220
|
ariaLabelledBy: Ee,
|
|
223
221
|
ariaDescribedBy: Be,
|
|
224
|
-
ariaLabel:
|
|
222
|
+
ariaLabel: Me,
|
|
225
223
|
max: R,
|
|
226
224
|
min: I,
|
|
227
225
|
name: n.name,
|
|
@@ -231,8 +229,8 @@ const ue = o.forwardRef((n, se) => {
|
|
|
231
229
|
tabIndex: i() ? -1 : be,
|
|
232
230
|
title: n.title,
|
|
233
231
|
valid: T().valid,
|
|
234
|
-
validationMessage:
|
|
235
|
-
validityStyles:
|
|
232
|
+
validationMessage: W,
|
|
233
|
+
validityStyles: K,
|
|
236
234
|
value: et,
|
|
237
235
|
label: void 0,
|
|
238
236
|
placeholder: g.focused ? null : xe,
|
|
@@ -241,7 +239,7 @@ const ue = o.forwardRef((n, se) => {
|
|
|
241
239
|
fillMode: null,
|
|
242
240
|
rounded: null,
|
|
243
241
|
autoFill: n.autoFill,
|
|
244
|
-
twoDigitYearMax:
|
|
242
|
+
twoDigitYearMax: Oe,
|
|
245
243
|
enableMouseWheel: n.enableMouseWheel,
|
|
246
244
|
autoCorrectParts: n.autoCorrectParts,
|
|
247
245
|
autoSwitchParts: Ce,
|
|
@@ -310,7 +308,7 @@ const ue = o.forwardRef((n, se) => {
|
|
|
310
308
|
), u() && nt)
|
|
311
309
|
);
|
|
312
310
|
return n.label ? /* @__PURE__ */ o.createElement(
|
|
313
|
-
|
|
311
|
+
Dt,
|
|
314
312
|
{
|
|
315
313
|
dateInput: c,
|
|
316
314
|
label: n.label,
|
|
@@ -399,7 +397,6 @@ const l = {
|
|
|
399
397
|
calendar: pt,
|
|
400
398
|
toggleButton: Ct,
|
|
401
399
|
popup: at,
|
|
402
|
-
pickerWrap: Dt,
|
|
403
400
|
disabled: !1,
|
|
404
401
|
format: "d",
|
|
405
402
|
max: gt,
|
|
@@ -412,10 +409,10 @@ const l = {
|
|
|
412
409
|
rounded: "medium",
|
|
413
410
|
fillMode: "solid",
|
|
414
411
|
autoFocus: !1
|
|
415
|
-
},
|
|
412
|
+
}, kt = dt();
|
|
416
413
|
ue.displayName = "KendoReactDatePicker";
|
|
417
414
|
export {
|
|
418
415
|
ue as DatePicker,
|
|
419
|
-
|
|
416
|
+
kt as DatePickerPropsContext,
|
|
420
417
|
l as datePickerDefaultProps
|
|
421
418
|
};
|
|
@@ -198,6 +198,9 @@ const o = class o extends i.Component {
|
|
|
198
198
|
/**
|
|
199
199
|
* Gets the popup state of the DateRangePicker.
|
|
200
200
|
*/
|
|
201
|
+
/**
|
|
202
|
+
* Whether the popup of the DateRangePicker is currently open.
|
|
203
|
+
*/
|
|
201
204
|
get show() {
|
|
202
205
|
return this.showDuringOnChange !== void 0 ? this.showDuringOnChange : this.props.show !== void 0 ? this.props.show : this.state.show;
|
|
203
206
|
}
|
|
@@ -154,7 +154,7 @@ const o = class o extends n.Component {
|
|
|
154
154
|
return this.props.name;
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* Returns a boolean value indicating whether the DateTimePicker is in mobile mode.
|
|
158
158
|
*/
|
|
159
159
|
get mobileMode() {
|
|
160
160
|
var t;
|