@progress/kendo-react-dateinputs 15.2.0-develop.1 → 15.2.0-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.
Files changed (39) hide show
  1. package/calendar/components/Calendar.js +1 -1
  2. package/calendar/components/Calendar.mjs +1 -1
  3. package/calendar/components/CalendarHeaderTitle.js +1 -1
  4. package/calendar/components/CalendarHeaderTitle.mjs +17 -5
  5. package/calendar/components/HorizontalViewList.js +1 -1
  6. package/calendar/components/HorizontalViewList.mjs +29 -29
  7. package/calendar/components/MultiViewCalendar.js +1 -1
  8. package/calendar/components/MultiViewCalendar.mjs +131 -128
  9. package/calendar/components/TodayCommand.js +1 -1
  10. package/calendar/components/TodayCommand.mjs +21 -32
  11. package/calendar/components/View.js +1 -1
  12. package/calendar/components/View.mjs +66 -66
  13. package/calendar/components/ViewList.js +1 -1
  14. package/calendar/components/ViewList.mjs +135 -125
  15. package/calendar/models/WeekDaysFormat.d.ts +1 -1
  16. package/common/AdaptiveMode.js +1 -1
  17. package/common/AdaptiveMode.mjs +30 -31
  18. package/dateinput/DateInput.js +1 -1
  19. package/dateinput/DateInput.mjs +35 -36
  20. package/datepicker/DatePicker.js +1 -1
  21. package/datepicker/DatePicker.mjs +21 -20
  22. package/datetimepicker/DateTimePicker.js +1 -1
  23. package/datetimepicker/DateTimePicker.mjs +15 -14
  24. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  25. package/messages/index.d.ts +5 -0
  26. package/messages/index.js +1 -1
  27. package/messages/index.mjs +46 -44
  28. package/package-metadata.js +1 -1
  29. package/package-metadata.mjs +2 -2
  30. package/package.json +9 -9
  31. package/timepicker/TimeList.js +2 -2
  32. package/timepicker/TimeList.mjs +51 -47
  33. package/timepicker/TimePart.js +1 -1
  34. package/timepicker/TimePart.mjs +57 -68
  35. package/timepicker/TimePicker.d.ts +7 -0
  36. package/timepicker/TimePicker.js +1 -1
  37. package/timepicker/TimePicker.mjs +20 -17
  38. package/timepicker/TimeSelector.js +1 -1
  39. package/timepicker/TimeSelector.mjs +56 -57
@@ -6,57 +6,57 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { ActionSheet as u, ActionSheetFooter as v } from "@progress/kendo-react-layout";
10
- import { checkIcon as C } from "@progress/kendo-svg-icons";
9
+ import { ActionSheet as v, ActionSheetFooter as C } from "@progress/kendo-react-layout";
10
+ import { checkIcon as g } from "@progress/kendo-svg-icons";
11
11
  import { Button as o } from "@progress/kendo-react-buttons";
12
- import { useAdaptiveModeContext as g } from "@progress/kendo-react-common";
13
- const I = (n) => {
12
+ import { useAdaptiveModeContext as y } from "@progress/kendo-react-common";
13
+ const T = (i) => {
14
14
  const {
15
15
  footer: e,
16
- windowWidth: l = 0,
17
- mobileFilter: r,
16
+ id: r,
17
+ windowWidth: n = 0,
18
+ mobileFilter: c,
18
19
  children: s,
19
- navigatable: c,
20
- navigatableElements: m,
20
+ navigatable: m,
21
+ navigatableElements: p,
21
22
  expand: d,
22
- animation: p,
23
- title: b,
24
- subTitle: f,
25
- onClose: i
26
- } = n, h = () => /* @__PURE__ */ t.createElement(
23
+ animation: b,
24
+ title: f,
25
+ subTitle: h,
26
+ onClose: l
27
+ } = i, u = () => /* @__PURE__ */ t.createElement(
27
28
  o,
28
29
  {
29
30
  tabIndex: 0,
30
31
  "aria-label": "Cancel",
31
- "aria-disabled": "false",
32
32
  type: "button",
33
33
  fillMode: "flat",
34
34
  size: "large",
35
35
  themeColor: "primary",
36
- svgIcon: C,
37
- onClick: i
36
+ svgIcon: g,
37
+ onClick: l
38
38
  }
39
- ), a = g(), x = {
40
- navigatable: c || !1,
41
- navigatableElements: m || [],
39
+ ), a = y(), x = {
40
+ id: r,
41
+ navigatable: m || !1,
42
+ navigatableElements: p || [],
42
43
  expand: d,
43
- animation: p !== !1,
44
- suffixActions: h(),
45
- filter: r,
46
- onClose: i,
47
- animationStyles: a && l <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
48
- title: b,
49
- subTitle: f,
44
+ animation: b !== !1,
45
+ suffixActions: u(),
46
+ filter: c,
47
+ onClose: l,
48
+ animationStyles: a && n <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
49
+ title: f,
50
+ subTitle: h,
50
51
  className: "k-adaptive-actionsheet",
51
- position: a && l <= a.small ? "fullscreen" : void 0
52
+ position: a && n <= a.small ? "fullscreen" : void 0
52
53
  };
53
- return /* @__PURE__ */ t.createElement(u, { ...x }, s, e && /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
54
+ return /* @__PURE__ */ t.createElement(v, { ...x }, s, e && /* @__PURE__ */ t.createElement(C, null, /* @__PURE__ */ t.createElement(
54
55
  o,
55
56
  {
56
57
  size: "large",
57
58
  tabIndex: 0,
58
59
  "aria-label": e.cancelText,
59
- "aria-disabled": "false",
60
60
  type: "button",
61
61
  onClick: e.onCancel
62
62
  },
@@ -68,7 +68,6 @@ const I = (n) => {
68
68
  themeColor: "primary",
69
69
  size: "large",
70
70
  "aria-label": e.applyText,
71
- "aria-disabled": "false",
72
71
  type: "button",
73
72
  onClick: e.onApply
74
73
  },
@@ -76,5 +75,5 @@ const I = (n) => {
76
75
  )));
77
76
  };
78
77
  export {
79
- I as AdaptiveMode
78
+ T as AdaptiveMode
80
79
  };
@@ -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 Fe=require("react"),t=require("prop-types"),E=require("@progress/kendo-date-math"),re=require("@progress/kendo-react-buttons"),le=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),He=require("@progress/kendo-react-labels"),ze=require("@progress/kendo-dateinputs-common"),B=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ke=require("../timepicker/utils.js"),Ue=require("../common/ClearButton.js"),We=require("./dateInputIntl.js");function Je(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const g in e)if(g!=="default"){const C=Object.getOwnPropertyDescriptor(e,g);Object.defineProperty(d,g,C.get?C:{enumerable:!0,get:()=>e[g]})}}return d.default=e,Object.freeze(d)}const a=Je(Fe),Ye="Please enter a valid value!";function ie(e,d){var ne,ae;const g=o.useId(e.id),C=ue.useInternationalization(),x=ue.useLocalization(),se=o.useUnstyled(),H=o.usePropsContext(j,e).unstyled||se,{format:p=u.format,defaultValue:ce=u.defaultValue,size:de=u.size,rounded:fe=u.rounded,fillMode:me=u.fillMode,formatPlaceholder:ge=u.formatPlaceholder,spinners:ve=u.spinners,disabled:w=u.disabled,min:be=u.min,max:ye=u.max,minTime:he=u.minTime,maxTime:Ie=u.maxTime,validityStyles:De=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:Oe=u.enableMouseWheel,autoCorrectParts:Ee=u.autoCorrectParts,autoSwitchParts:Ce=u.autoSwitchParts,allowCaretMode:xe=u.allowCaretMode,twoDigitYearMax:we=u.twoDigitYearMax,ariaHasPopup:Te=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(j,e),T=n=>{Ae(r=>({...r,...n}))},v=()=>q.value?q.value:R.current!==void 0?R.current:l.current&&l.current.value,K=()=>{const n=l.current&&l.current.currentText||"",r=v();return y!=null&&!q.focused&&!r?y:n},U=()=>e.required!==void 0?e.required:!1,V=()=>{const n=v()||e.value,r=be,O=ye,k=B.isInRange(n,r,O)&&Ke.isInTimeRange(n,he,Ie),A=z!==void 0,_=(!U()||n!=null)&&k,je=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&O.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<r.getTime()||!1,valid:je,valueMissing:n===null}},Se=()=>{s.current&&s.current.focus()},W=()=>new We.DateInputIntl(C),S=()=>{const n=v();return{format:p,steps:e.steps,formatPlaceholder:ge,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:W(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:Oe,autoCorrectParts:Ee,autoSwitchParts:Ce,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:we,allowCaretMode:xe}},Me=n=>{f.current&&f.current.classList.add("k-focus"),T({focused:!0}),h&&$(!0)},Pe=n=>{f.current&&f.current.classList.remove("k-focus"),T({focused:!1})},Re=(n,r)=>typeof n!=typeof r?!0:typeof n=="string"&&typeof r=="string"?n!==r:typeof n=="object"&&typeof r=="object"?JSON.stringify(n)!==JSON.stringify(r):!1,pe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{R.current=v(),e.value===void 0&&T({value:n.value!==void 0?n.value:null}),_e(),b.current=n,R.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Ve=()=>new ze.DateInput(s.current,{...S(),format:pe(S().format),events:{focus:Me,blur:Pe,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(V().valid?"":z||u.validationMessage)},$=a.useCallback(n=>{var r;if(s.current&&h&&n){const O=(l==null?void 0:l.current).currentText,k=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=O[k],_=O.split(A)[0].length;f.current&&f.current.classList.add("k-focus"),(r=l==null?void 0:l.current)==null||r.selectNearestSegment(_)}},[h]),Ne=n=>{!s.current||!l.current||J(n)},qe=n=>{n.preventDefault();const r=o.getActiveElement(document);s.current&&r!==s.current&&s.current.focus({preventScroll:!0})},m=n=>{const r=v();b.current&&e.onChange&&!E.isEqual(b.current.oldValue,r)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:b.current.event,value:b.current.value,target:M.current}),b.current=null},Le=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(1),m(n)},ke=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(-1),m(n)},M=a.useRef(null),s=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(M,()=>({props:e,get options(){return S()},get text(){return K()},get element(){return s.current},get name(){return e.name},get value(){return v()},get validity(){return V()},focus:Se,updateOnPaste:Ne})),a.useImperativeHandle(d,()=>M.current);const l=a.useRef(null),P=a.useRef(null),N=a.useRef(!1),R=a.useRef(null),b=a.useRef(null),I=a.useRef(e),[q,Ae]=a.useState({value:e.value===void 0?ce:null,focused:!1}),[,_e]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{N.current||(l.current=Ve(),P.current=l.current.dateObject,N.current=!0)},[]),a.useEffect(()=>{Z();const n=f.current||s.current;return N.current||n&&n.addEventListener("wheel",X,{passive:!1}),h&&(T({focused:!0}),$(!0)),()=>{n&&n.removeEventListener("wheel",X)}},[]),a.useEffect(()=>{Z(),l.current&&(P.current=l.current.dateObject,(Re(I.current.format,p)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||W().locale!==l.current.options.intlService.locale)&&l.current.setOptions(S(),!0),I.current.value!==e.value&&(P.current.getValue()!==null||e.value!==null)&&P.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:p,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||g+"-accessibility-id",D=H&&H.uDateInput,Q=K(),L=!De||V().valid;a.useImperativeHandle(e._ref,()=>M.current);const ee=a.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||void 0,readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:w,title:(ne=e.title)!=null?ne:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:D})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":Te,"aria-disabled":w||void 0,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!L||void 0,onKeyDown:m,onChange:m,onWheel:m,onInput:m,onClick:m,name:e.name,...e.inputAttributes}),te=a.createElement("span",{ref:n=>{f.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:D,size:de,fillMode:me,rounded:fe,disabled:w,required:U(),invalid:!L}),e.className)},ee,e.children,e.clearButton&&e.value&&a.createElement(Ue,{onClick:Y,key:"clearbutton"}),ve&&a.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:D})),onMouseDown:qe},a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:D})),icon:"chevron-up",svgIcon:le.chevronUpIcon,"aria-label":x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Le}),a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:D})),icon:"chevron-down",svgIcon:le.chevronDownIcon,"aria-label":x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:ke}))),Be=e.label?a.createElement(He.FloatingLabel,{label:e.label,editorId:G,editorValue:(ae=s.current)==null?void 0:ae.value,editorValid:L,editorDisabled:w,children:te,style:{width:e.width}}):te;return{inputElement:ee,wrappedElement:Be}}const F=a.forwardRef((e,d)=>ie(e,d).wrappedElement),oe=a.forwardRef((e,d)=>ie(e,d).inputElement);oe.displayName="KendoReactDateInputInner";F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:B.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:B.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:E.cloneDate(i.MAX_DATE),min:E.cloneDate(i.MIN_DATE),minTime:E.cloneDate(i.MIN_TIME),maxTime:E.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Ye,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:void 0,autoFocus:!1},j=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputInner=oe;exports.DateInputPropsContext=j;exports.dateInputDefaultProps=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("react"),t=require("prop-types"),E=require("@progress/kendo-date-math"),re=require("@progress/kendo-react-buttons"),le=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-common"),He=require("@progress/kendo-react-labels"),ze=require("@progress/kendo-dateinputs-common"),B=require("./utils.js"),i=require("../utils.js"),c=require("../messages/index.js"),Ke=require("../timepicker/utils.js"),Ue=require("../common/ClearButton.js"),We=require("./dateInputIntl.js");function Je(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const g in e)if(g!=="default"){const C=Object.getOwnPropertyDescriptor(e,g);Object.defineProperty(d,g,C.get?C:{enumerable:!0,get:()=>e[g]})}}return d.default=e,Object.freeze(d)}const a=Je(Fe),Ye="Please enter a valid value!";function ie(e,d){var ne,ae;const g=o.useId(e.id),C=ue.useInternationalization(),x=ue.useLocalization(),se=o.useUnstyled(),H=o.usePropsContext(j,e).unstyled||se,{format:R=u.format,defaultValue:ce=u.defaultValue,size:de=u.size,rounded:fe=u.rounded,fillMode:me=u.fillMode,formatPlaceholder:ge=u.formatPlaceholder,spinners:ve=u.spinners,disabled:p=u.disabled,min:be=u.min,max:ye=u.max,minTime:he=u.minTime,maxTime:Ie=u.maxTime,validityStyles:De=u.validityStyles,validationMessage:z=u.validationMessage,placeholder:y=u.placeholder,enableMouseWheel:Oe=u.enableMouseWheel,autoCorrectParts:Ee=u.autoCorrectParts,autoSwitchParts:Ce=u.autoSwitchParts,allowCaretMode:xe=u.allowCaretMode,twoDigitYearMax:we=u.twoDigitYearMax,ariaHasPopup:Te=u.ariaHasPopup,autoFocus:h=u.autoFocus}=o.usePropsContext(j,e),w=n=>{Ae(r=>({...r,...n}))},v=()=>q.value?q.value:P.current!==void 0?P.current:l.current&&l.current.value,K=()=>{const n=l.current&&l.current.currentText||"",r=v();return y!=null&&!q.focused&&!r?y:n},U=()=>e.required!==void 0?e.required:!1,V=()=>{const n=v()||e.value,r=be,O=ye,k=B.isInRange(n,r,O)&&Ke.isInTimeRange(n,he,Ie),A=z!==void 0,_=(!U()||n!=null)&&k,je=e.valid!==void 0?e.valid:_;return{customError:A,rangeOverflow:n&&O.getTime()<n.getTime()||!1,rangeUnderflow:n&&n.getTime()<r.getTime()||!1,valid:je,valueMissing:n===null}},Se=()=>{s.current&&s.current.focus()},W=()=>new We.DateInputIntl(C),T=()=>{const n=v();return{format:R,steps:e.steps,formatPlaceholder:ge,placeholder:y,selectPreviousSegmentOnBackspace:!0,value:e.value!==void 0?e.value:n,intlService:W(),autoFill:e.autoFill!==void 0?e.autoFill:!1,enableMouseWheel:Oe,autoCorrectParts:Ee,autoSwitchParts:Ce,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:we,allowCaretMode:xe}},Me=n=>{f.current&&f.current.classList.add("k-focus"),w({focused:!0}),h&&$(!0)},Pe=n=>{f.current&&f.current.classList.remove("k-focus"),w({focused:!1})},Re=(n,r)=>typeof n!=typeof r?!0:typeof n=="string"&&typeof r=="string"?n!==r:typeof n=="object"&&typeof r=="object"?JSON.stringify(n)!==JSON.stringify(r):!1,pe=n=>typeof n=="string"?n:{inputFormat:n,displayFormat:n},J=n=>{P.current=v(),e.value===void 0&&w({value:n.value!==void 0?n.value:null}),_e(),b.current=n,P.current=void 0},Y=n=>{e.onChange&&e.onChange(n)},X=n=>{o.getActiveElement(document)===s.current&&n.preventDefault()},Ve=()=>new ze.DateInput(s.current,{...T(),format:pe(T().format),events:{focus:Me,blur:Pe,valueChange:J,click:Y}}),Z=()=>{s.current&&s.current.setCustomValidity&&s.current.setCustomValidity(V().valid?"":z||u.validationMessage)},$=a.useCallback(n=>{var r;if(s.current&&h&&n){const O=(l==null?void 0:l.current).currentText,k=(l==null?void 0:l.current).currentText.search(/[^a-zA-Z]/),A=O[k],_=O.split(A)[0].length;f.current&&f.current.classList.add("k-focus"),(r=l==null?void 0:l.current)==null||r.selectNearestSegment(_)}},[h]),Ne=n=>{!s.current||!l.current||J(n)},qe=n=>{n.preventDefault();const r=o.getActiveElement(document);s.current&&r!==s.current&&s.current.focus({preventScroll:!0})},m=n=>{const r=v();b.current&&e.onChange&&!E.isEqual(b.current.oldValue,r)&&e.onChange.call(void 0,{syntheticEvent:n,nativeEvent:b.current.event,value:b.current.value,target:S.current}),b.current=null},Le=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(1),m(n)},ke=n=>{var r;(r=l.current)==null||r.modifyDateSegmentValue(-1),m(n)},S=a.useRef(null),s=a.useRef(null),f=a.useRef(null);a.useImperativeHandle(S,()=>({props:e,get options(){return T()},get text(){return K()},get element(){return s.current},get name(){return e.name},get value(){return v()},get validity(){return V()},focus:Se,updateOnPaste:Ne})),a.useImperativeHandle(d,()=>S.current);const l=a.useRef(null),M=a.useRef(null),N=a.useRef(!1),P=a.useRef(null),b=a.useRef(null),I=a.useRef(e),[q,Ae]=a.useState({value:e.value===void 0?ce:null,focused:!1}),[,_e]=a.useReducer(n=>n+1,0);a.useLayoutEffect(()=>{N.current||(l.current=Ve(),M.current=l.current.dateObject,N.current=!0)},[]),a.useEffect(()=>{Z();const n=f.current||s.current;return N.current||n&&n.addEventListener("wheel",X,{passive:!1}),h&&(w({focused:!0}),$(!0)),()=>{n&&n.removeEventListener("wheel",X)}},[]),a.useEffect(()=>{Z(),l.current&&(M.current=l.current.dateObject,(Re(I.current.format,R)||I.current.readonly!==e.readonly||JSON.stringify(I.current.steps)!==JSON.stringify(e.steps)||W().locale!==l.current.options.intlService.locale)&&l.current.setOptions(T(),!0),I.current.value!==e.value&&(M.current.getValue()!==null||e.value!==null)&&M.current.setValue(e.value),e.ariaExpanded!==void 0&&e.ariaExpanded&&(l.current.options.placeholder=null),e.ariaExpanded!==void 0&&!e.ariaExpanded&&(l.current.options.placeholder=y),l.current.refreshElementValue(),I.current={format:R,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const G=e.id||g+"-accessibility-id",D=H&&H.uDateInput,Q=K(),L=!De||V().valid;a.useImperativeHandle(e._ref,()=>S.current);const ee=a.createElement("input",{ref:n=>{s.current=n},role:e.ariaRole||void 0,readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:p,title:(ne=e.title)!=null?ne:Q,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:h,className:o.classNames(o.uDateInput.inputInner({c:D})),id:G,value:Q,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":Te,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!L||void 0,onKeyDown:m,onChange:m,onWheel:m,onInput:m,onClick:m,name:e.name,...e.inputAttributes}),te=a.createElement("span",{ref:n=>{f.current=n},style:e.label?void 0:{width:e.width},dir:e.dir,className:o.classNames(o.uDateInput.wrapper({c:D,size:de,fillMode:me,rounded:fe,disabled:p,required:U(),invalid:!L}),e.className)},ee,e.children,e.clearButton&&e.value&&a.createElement(Ue,{onClick:Y,key:"clearbutton"}),ve&&a.createElement("span",{className:o.classNames(o.uDateInput.inputSpinner({c:D})),onMouseDown:qe},a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerIncrease({c:D})),icon:"chevron-up",svgIcon:le.chevronUpIcon,"aria-label":x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),title:x.toLanguageString(c.increaseValue,c.messages[c.increaseValue]),onClick:Le}),a.createElement(re.Button,{tabIndex:-1,type:"button",className:o.classNames(o.uDateInput.spinnerDecrease({c:D})),icon:"chevron-down",svgIcon:le.chevronDownIcon,"aria-label":x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),title:x.toLanguageString(c.decreaseValue,c.messages[c.decreaseValue]),onClick:ke}))),Be=e.label?a.createElement(He.FloatingLabel,{label:e.label,editorId:G,editorValue:(ae=s.current)==null?void 0:ae.value,editorValid:L,editorDisabled:p,children:te,style:{width:e.width}}):te;return{inputElement:ee,wrappedElement:Be}}const F=a.forwardRef((e,d)=>ie(e,d).wrappedElement),oe=a.forwardRef((e,d)=>ie(e,d).inputElement);oe.displayName="KendoReactDateInputInner";F.propTypes={value:t.instanceOf(Date),format:t.oneOfType([i.nullable(t.string),t.shape({skeleton:t.string,pattern:t.string,date:t.oneOf(["short","medium","long","full"]),time:t.oneOf(["short","medium","long","full"]),datetime:t.oneOf(["short","medium","long","full"]),era:t.oneOf(["narrow","short","long"]),year:t.oneOf(["numeric","2-digit"]),month:t.oneOf(["numeric","2-digit","narrow","short","long"]),day:t.oneOf(["numeric","2-digit"]),weekday:t.oneOf(["narrow","short","long"]),hour:t.oneOf(["numeric","2-digit"]),hour12:t.bool,minute:t.oneOf(["numeric","2-digit"]),second:t.oneOf(["numeric","2-digit"]),timeZoneName:t.oneOf(["short","long"])})]),formatPlaceholder:t.oneOfType([i.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:i.nullable(t.string),month:i.nullable(t.string),day:i.nullable(t.string),hour:i.nullable(t.string),minute:i.nullable(t.string),second:i.nullable(t.string)})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,title:t.string,steps:t.shape({year:i.nullable(t.number),month:i.nullable(t.number),day:i.nullable(t.number),hour:i.nullable(t.number),minute:i.nullable(t.number),second:i.nullable(t.number)}),min:t.instanceOf(Date),max:t.instanceOf(Date),disabled:t.bool,spinners:t.bool,name:t.string,dir:t.string,label:t.node,id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,ariaRole:t.string,ariaHasPopup:t.oneOfType([t.bool,t.oneOf(["grid","dialog"])]),ariaExpanded:t.oneOfType([t.bool]),onChange:t.func,validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object};const u={format:B.DEFAULT_FORMAT,defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:B.DEFAULT_FORMAT_PLACEHOLDER,spinners:!1,disabled:!1,max:E.cloneDate(i.MAX_DATE),min:E.cloneDate(i.MIN_DATE),minTime:E.cloneDate(i.MIN_TIME),maxTime:E.cloneDate(i.MAX_TIME),validityStyles:!0,validationMessage:Ye,placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:void 0,autoFocus:!1},j=o.createPropsContext();F.displayName="KendoReactDateInput";exports.DateInput=F;exports.DateInputInner=oe;exports.DateInputPropsContext=j;exports.dateInputDefaultProps=u;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as a from "react";
9
9
  import e from "prop-types";
10
- import { cloneDate as S, isEqual as ze } from "@progress/kendo-date-math";
10
+ import { cloneDate as M, isEqual as ze } from "@progress/kendo-date-math";
11
11
  import { Button as ne } from "@progress/kendo-react-buttons";
12
12
  import { chevronUpIcon as je, chevronDownIcon as Ke } from "@progress/kendo-svg-icons";
13
13
  import { useInternationalization as Ue, useLocalization as We } from "@progress/kendo-react-intl";
@@ -16,7 +16,7 @@ import { FloatingLabel as Ze } from "@progress/kendo-react-labels";
16
16
  import { DateInput as Ge } from "@progress/kendo-dateinputs-common";
17
17
  import { DEFAULT_FORMAT_PLACEHOLDER as $e, DEFAULT_FORMAT as Qe, isInRange as et } from "./utils.mjs";
18
18
  import { MAX_TIME as tt, MIN_TIME as nt, MIN_DATE as at, MAX_DATE as rt, nullable as u } from "../utils.mjs";
19
- import { increaseValue as p, messages as P, decreaseValue as R } from "../messages/index.mjs";
19
+ import { increaseValue as S, messages as p, decreaseValue as P } from "../messages/index.mjs";
20
20
  import { isInTimeRange as it } from "../timepicker/utils.mjs";
21
21
  import lt from "../common/ClearButton.mjs";
22
22
  import { DateInputIntl as ot } from "./dateInputIntl.mjs";
@@ -24,14 +24,14 @@ const ut = "Please enter a valid value!";
24
24
  function le(t, m) {
25
25
  var ee, te;
26
26
  const ue = Ye(t.id), se = Ue(), O = We(), ce = Xe(), H = ae(ie, t).unstyled || ce, {
27
- format: L = l.format,
27
+ format: R = l.format,
28
28
  defaultValue: de = l.defaultValue,
29
29
  size: fe = l.size,
30
30
  rounded: me = l.rounded,
31
31
  fillMode: ge = l.fillMode,
32
32
  formatPlaceholder: ve = l.formatPlaceholder,
33
33
  spinners: he = l.spinners,
34
- disabled: w = l.disabled,
34
+ disabled: L = l.disabled,
35
35
  min: ye = l.min,
36
36
  max: be = l.max,
37
37
  minTime: Ie = l.minTime,
@@ -46,9 +46,9 @@ function le(t, m) {
46
46
  twoDigitYearMax: Te = l.twoDigitYearMax,
47
47
  ariaHasPopup: Me = l.ariaHasPopup,
48
48
  autoFocus: v = l.autoFocus
49
- } = ae(ie, t), x = (n) => {
49
+ } = ae(ie, t), w = (n) => {
50
50
  Fe((r) => ({ ...r, ...n }));
51
- }, d = () => A.value ? A.value : M.current !== void 0 ? M.current : i.current && i.current.value, z = () => {
51
+ }, d = () => A.value ? A.value : T.current !== void 0 ? T.current : i.current && i.current.value, z = () => {
52
52
  const n = i.current && i.current.currentText || "", r = d();
53
53
  return g != null && !A.focused && !r ? g : n;
54
54
  }, j = () => t.required !== void 0 ? t.required : !1, V = () => {
@@ -62,10 +62,10 @@ function le(t, m) {
62
62
  };
63
63
  }, Se = () => {
64
64
  o.current && o.current.focus();
65
- }, K = () => new ot(se), C = () => {
65
+ }, K = () => new ot(se), x = () => {
66
66
  const n = d();
67
67
  return {
68
- format: L,
68
+ format: R,
69
69
  steps: t.steps,
70
70
  formatPlaceholder: ve,
71
71
  placeholder: g,
@@ -81,21 +81,21 @@ function le(t, m) {
81
81
  allowCaretMode: De
82
82
  };
83
83
  }, pe = (n) => {
84
- s.current && s.current.classList.add("k-focus"), x({ focused: !0 }), v && X(!0);
84
+ s.current && s.current.classList.add("k-focus"), w({ focused: !0 }), v && X(!0);
85
85
  }, Pe = (n) => {
86
- s.current && s.current.classList.remove("k-focus"), x({ focused: !1 });
86
+ s.current && s.current.classList.remove("k-focus"), w({ focused: !1 });
87
87
  }, Re = (n, r) => typeof n != typeof r ? !0 : typeof n == "string" && typeof r == "string" ? n !== r : typeof n == "object" && typeof r == "object" ? JSON.stringify(n) !== JSON.stringify(r) : !1, Le = (n) => typeof n == "string" ? n : {
88
88
  inputFormat: n,
89
89
  displayFormat: n
90
90
  }, U = (n) => {
91
- M.current = d(), t.value === void 0 && x({ value: n.value !== void 0 ? n.value : null }), Be(), f.current = n, M.current = void 0;
91
+ T.current = d(), t.value === void 0 && w({ value: n.value !== void 0 ? n.value : null }), Be(), f.current = n, T.current = void 0;
92
92
  }, W = (n) => {
93
93
  t.onChange && t.onChange(n);
94
94
  }, J = (n) => {
95
95
  re(document) === o.current && n.preventDefault();
96
96
  }, Ve = () => new Ge(o.current, {
97
- ...C(),
98
- format: Le(C().format),
97
+ ...x(),
98
+ format: Le(x().format),
99
99
  events: {
100
100
  focus: pe,
101
101
  blur: Pe,
@@ -127,7 +127,7 @@ function le(t, m) {
127
127
  syntheticEvent: n,
128
128
  nativeEvent: f.current.event,
129
129
  value: f.current.value,
130
- target: D.current
130
+ target: C.current
131
131
  }), f.current = null;
132
132
  }, ke = (n) => {
133
133
  var r;
@@ -135,13 +135,13 @@ function le(t, m) {
135
135
  }, _e = (n) => {
136
136
  var r;
137
137
  (r = i.current) == null || r.modifyDateSegmentValue(-1), c(n);
138
- }, D = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
138
+ }, C = a.useRef(null), o = a.useRef(null), s = a.useRef(null);
139
139
  a.useImperativeHandle(
140
- D,
140
+ C,
141
141
  () => ({
142
142
  props: t,
143
143
  get options() {
144
- return C();
144
+ return x();
145
145
  },
146
146
  get text() {
147
147
  return z();
@@ -162,22 +162,22 @@ function le(t, m) {
162
162
  focus: Se,
163
163
  updateOnPaste: Ne
164
164
  })
165
- ), a.useImperativeHandle(m, () => D.current);
166
- const i = a.useRef(null), T = a.useRef(null), N = a.useRef(!1), M = a.useRef(null), f = a.useRef(null), h = a.useRef(t), [A, Fe] = a.useState({
165
+ ), a.useImperativeHandle(m, () => C.current);
166
+ const i = a.useRef(null), D = a.useRef(null), N = a.useRef(!1), T = a.useRef(null), f = a.useRef(null), h = a.useRef(t), [A, Fe] = a.useState({
167
167
  value: t.value === void 0 ? de : null,
168
168
  focused: !1
169
169
  }), [, Be] = a.useReducer((n) => n + 1, 0);
170
170
  a.useLayoutEffect(() => {
171
- N.current || (i.current = Ve(), T.current = i.current.dateObject, N.current = !0);
171
+ N.current || (i.current = Ve(), D.current = i.current.dateObject, N.current = !0);
172
172
  }, []), a.useEffect(() => {
173
173
  Y();
174
174
  const n = s.current || o.current;
175
- return N.current || n && n.addEventListener("wheel", J, { passive: !1 }), v && (x({ focused: !0 }), X(!0)), () => {
175
+ return N.current || n && n.addEventListener("wheel", J, { passive: !1 }), v && (w({ focused: !0 }), X(!0)), () => {
176
176
  n && n.removeEventListener("wheel", J);
177
177
  };
178
178
  }, []), a.useEffect(() => {
179
- Y(), i.current && (T.current = i.current.dateObject, (Re(h.current.format, L) || h.current.readonly !== t.readonly || JSON.stringify(h.current.steps) !== JSON.stringify(t.steps) || K().locale !== i.current.options.intlService.locale) && i.current.setOptions(C(), !0), h.current.value !== t.value && (T.current.getValue() !== null || t.value !== null) && T.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (i.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (i.current.options.placeholder = g), i.current.refreshElementValue(), h.current = {
180
- format: L,
179
+ Y(), i.current && (D.current = i.current.dateObject, (Re(h.current.format, R) || h.current.readonly !== t.readonly || JSON.stringify(h.current.steps) !== JSON.stringify(t.steps) || K().locale !== i.current.options.intlService.locale) && i.current.setOptions(x(), !0), h.current.value !== t.value && (D.current.getValue() !== null || t.value !== null) && D.current.setValue(t.value), t.ariaExpanded !== void 0 && t.ariaExpanded && (i.current.options.placeholder = null), t.ariaExpanded !== void 0 && !t.ariaExpanded && (i.current.options.placeholder = g), i.current.refreshElementValue(), h.current = {
180
+ format: R,
181
181
  readonly: t.readonly,
182
182
  ariaExpanded: t.ariaExpanded,
183
183
  steps: t.steps,
@@ -185,7 +185,7 @@ function le(t, m) {
185
185
  });
186
186
  });
187
187
  const Z = t.id || ue + "-accessibility-id", y = H && H.uDateInput, G = z(), k = !Oe || V().valid;
188
- a.useImperativeHandle(t._ref, () => D.current);
188
+ a.useImperativeHandle(t._ref, () => C.current);
189
189
  const $ = /* @__PURE__ */ a.createElement(
190
190
  "input",
191
191
  {
@@ -195,7 +195,7 @@ function le(t, m) {
195
195
  role: t.ariaRole || void 0,
196
196
  readOnly: t.readonly,
197
197
  tabIndex: t.tabIndex || 0,
198
- disabled: w,
198
+ disabled: L,
199
199
  title: (ee = t.title) != null ? ee : G,
200
200
  type: "text",
201
201
  spellCheck: !1,
@@ -209,7 +209,6 @@ function le(t, m) {
209
209
  "aria-labelledby": t.ariaLabelledBy,
210
210
  "aria-describedby": t.ariaDescribedBy,
211
211
  "aria-haspopup": Me,
212
- "aria-disabled": w || void 0,
213
212
  "aria-expanded": t.ariaExpanded,
214
213
  "aria-controls": t.ariaControls,
215
214
  "aria-required": t.required,
@@ -236,7 +235,7 @@ function le(t, m) {
236
235
  size: fe,
237
236
  fillMode: ge,
238
237
  rounded: me,
239
- disabled: w,
238
+ disabled: L,
240
239
  required: j(),
241
240
  invalid: !k
242
241
  }),
@@ -254,8 +253,8 @@ function le(t, m) {
254
253
  className: I(E.spinnerIncrease({ c: y })),
255
254
  icon: "chevron-up",
256
255
  svgIcon: je,
257
- "aria-label": O.toLanguageString(p, P[p]),
258
- title: O.toLanguageString(p, P[p]),
256
+ "aria-label": O.toLanguageString(S, p[S]),
257
+ title: O.toLanguageString(S, p[S]),
259
258
  onClick: ke
260
259
  }
261
260
  ), /* @__PURE__ */ a.createElement(
@@ -266,8 +265,8 @@ function le(t, m) {
266
265
  className: I(E.spinnerDecrease({ c: y })),
267
266
  icon: "chevron-down",
268
267
  svgIcon: Ke,
269
- "aria-label": O.toLanguageString(R, P[R]),
270
- title: O.toLanguageString(R, P[R]),
268
+ "aria-label": O.toLanguageString(P, p[P]),
269
+ title: O.toLanguageString(P, p[P]),
271
270
  onClick: _e
272
271
  }
273
272
  ))
@@ -278,7 +277,7 @@ function le(t, m) {
278
277
  editorId: Z,
279
278
  editorValue: (te = o.current) == null ? void 0 : te.value,
280
279
  editorValid: k,
281
- editorDisabled: w,
280
+ editorDisabled: L,
282
281
  children: Q,
283
282
  style: { width: t.width }
284
283
  }
@@ -369,10 +368,10 @@ const l = {
369
368
  formatPlaceholder: $e,
370
369
  spinners: !1,
371
370
  disabled: !1,
372
- max: S(rt),
373
- min: S(at),
374
- minTime: S(nt),
375
- maxTime: S(tt),
371
+ max: M(rt),
372
+ min: M(at),
373
+ minTime: M(nt),
374
+ maxTime: M(tt),
376
375
  validityStyles: !0,
377
376
  validationMessage: ut,
378
377
  placeholder: null,
@@ -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 it=require("react"),t=require("prop-types"),st=require("@progress/kendo-react-popup"),j=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),ct=require("@progress/kendo-svg-icons"),dt=require("../dateinput/DateInput.js"),ft=require("../calendar/components/Calendar.js"),r=require("../utils.js"),H=require("../messages/index.js"),mt=require("@progress/kendo-react-intl"),pt=require("./ToggleButton.js"),gt=require("../hooks/usePickerFloatingLabel.js"),bt=require("@progress/kendo-react-layout"),ht=require("../common/AdaptiveMode.js");function vt(n){const D=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(D,f,I.get?I:{enumerable:!0,get:()=>n[f]})}}return D.default=n,Object.freeze(D)}const o=vt(it),U=o.forwardRef((n,D)=>{const f=u.useId(n.id),I=mt.useLocalization(),k=u.useAdaptiveModeContext(),{defaultShow:me=l.defaultShow,defaultValue:pe=l.defaultValue,dateInput:ge=l.dateInput,calendar:be=l.calendar,toggleButton:he=l.toggleButton,popup:ve=l.popup,disabled:g=l.disabled,format:we=l.format,max:C=l.max,min:P=l.min,popupSettings:O=l.popupSettings,tabIndex:ye=l.tabIndex,weekNumber:De=l.weekNumber,validityStyles:Y=l.validityStyles,size:B=l.size,rounded:E=l.rounded,fillMode:x=l.fillMode,autoFocus:ke=l.autoFocus,show:$,autoSwitchParts:Ce,autoSwitchKeys:Pe,twoDigitYearMax:Oe,ariaLabel:Me,adaptive:wt,adaptiveTitle:Re=n.label||void 0,adaptiveSubtitle:Ie,formatPlaceholder:Se,inputAttributes:_e,validationMessage:X,visited:yt,value:q,touched:Dt,modified:kt,_adaptiveMode:Ct=k,valid:Z,focusedDate:Te,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,placeholder:qe,onChange:G,onOpen:J,onClose:Q,...ee}=u.usePropsContext(fe,n),N=()=>{if(u.canUseDOM)return m.current&&m.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&k&&b.windowWidth<=(k==null?void 0:k.medium)&&n.adaptive),h=()=>{const e=S.current!==void 0?S.current:q!==void 0?q:b.value;return e!==null?j.cloneDate(e):null},i=()=>_.current!==void 0?_.current:$!==void 0?$:b.show,Ne=()=>ge||l.dateInput,Ae=()=>he||l.toggleButton,Fe=()=>be||l.calendar,Le=()=>ve||l.popup,te=()=>n.required!==void 0?n.required:!1,A=()=>{const e=h()||q||null,a=P,s=C,T=r.isInDateRange(e,a,s),K=X!==void 0,V=(!te()||e!=null)&&T,W=Z!==void 0?Z:V;return{customError:K,rangeOverflow:e&&s.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<a.getTime()||!1,valid:W,valueMissing:e===null}},ze=e=>{for(const a of e)R({windowWidth:a.target.clientWidth})},Ke=()=>{d.current&&d.current.focus()},ne=e=>{p.current=e},v=e=>{i()!==e&&(R({show:e}),e&&J&&J({target:w.current}),!e&&Q&&Q({target:w.current}))},Ve=e=>{const a=h();return a&&e?r.setTime(e,a):e},We=e=>{O!=null&&O.onMouseDownOutside&&O.onMouseDownOutside(e)},F=(e,a)=>{R({value:j.cloneDate(e||void 0)}),S.current=e,_.current=!1,c()||(y.current=!0),G&&G({syntheticEvent:a.syntheticEvent,nativeEvent:a.nativeEvent,value:h(),show:i(),target:w.current}),S.current=void 0,_.current=void 0,v(!1)},je=e=>{const a=Ve(e.value);F(a,e)},ae=()=>{const{popupClass:e,...a}=O,s=i(),T=h(),K=T&&j.getDate(T),V=u.classNames(e),W={popupClass:"k-datepicker-popup",show:s,anchor:m.current,className:V,id:le,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...a,onMouseDownOutside:We},ce={disabled:g,value:K,min:P,max:C,weekNumber:De,focusedDate:Te,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:je},de=Fe(),ut=Le();return c()?o.createElement(de,{_ref:ne,...ce}):o.createElement(ut,{...W},o.createElement(de,{_ref:ne,...ce}))},oe=()=>{R({focused:!1}),v(!1)},He=()=>{const{windowWidth:e=0}=b,a={expand:i(),onClose:oe,title:Re,subTitle:Ie,windowWidth:e};return o.createElement(ht.AdaptiveMode,{...a},o.createElement(bt.ActionSheetContent,null,ae()))},Ue=e=>{F(e.value,e)},Ye=()=>{R({focused:!0})},$e=()=>{v(!i())},L=()=>{g||(y.current=!0,v(!i()))},Xe=e=>{e.preventDefault()},Ze=e=>{const{altKey:a,keyCode:s}=e;if(s===u.Keys.esc&&i()){y.current=!0,v(!1);return}a&&(s===u.Keys.up||s===u.Keys.down)&&(e.preventDefault(),e.stopPropagation(),y.current=s===u.Keys.up,v(s===u.Keys.down))},w=o.useRef(null),m=o.useRef(null),d=o.useRef(null),p=o.useRef(null);o.useImperativeHandle(w,()=>({props:n,get element(){return m.current},get calendar(){return p.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return A()},get value(){return h()},get mobileMode(){return c()},togglePopup:$e,focus:Ke})),o.useImperativeHandle(D,()=>w.current),u.useWebMcpRegister("datepicker",w,n,n.webMcp);const S=o.useRef(void 0),_=o.useRef(void 0),Ge=o.useRef(null),y=o.useRef(!1),z=o.useRef(!1),M=o.useRef(null),[b,Je]=o.useState({value:pe,show:me,focused:!1}),[,Qe]=o.useReducer(e=>e,!0),re=n.name||f||void 0,et=o.useCallback(e=>{if(g)return;let a=null;if(e!=null){if(e instanceof Date)a=e;else if(typeof e=="string"||typeof e=="number"){const s=new Date(e);isNaN(s.getTime())||(a=s)}}if(a&&r.isInDateRange(a,P,C)){const s={target:m.current,currentTarget:m.current};F(a,{syntheticEvent:s})}},[g,P,C]);u.useKendoPaste(m,{fieldName:re,onValueChange:et,enabled:!!re});const R=e=>{Je(a=>({...a,...e}))};o.useEffect(()=>{p.current&&p.current.element&&i()&&!z.current&&p.current.element.focus({preventScroll:!0}),c()&&i()&&!z.current&&setTimeout(()=>{p.current&&p.current.element&&p.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!i()&&y.current&&d.current.element.focus({preventScroll:!0}),z.current=i(),y.current=!1}),o.useEffect(()=>{var e;return M.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(a=>ze(a)),i()&&Qe(),(e=N())!=null&&e.body&&M.current&&M.current.observe(N().body),()=>{var a;clearTimeout(Ge.current),(a=N())!=null&&a.body&&M.current&&M.current.disconnect()}},[]);const le=f+"-popup-id",tt=ae(),nt=Ne(),at=h(),ot=Ae(),rt=He(),ue=!Y||A().valid,ie=I.toLanguageString(H.toggleCalendar,H.messages[H.toggleCalendar]),lt={disabled:g,format:we,formatPlaceholder:Se,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,ariaLabel:Me,max:C,min:P,name:n.name,onChange:Ue,required:n.required,_ref:d,tabIndex:i()?-1:ye,title:n.title,valid:A().valid,validationMessage:X,validityStyles:Y,value:at,label:void 0,placeholder:b.focused?null:qe,ariaExpanded:i(),autoFill:n.autoFill,twoDigitYearMax:Oe,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:Ce,autoSwitchKeys:Pe,allowCaretMode:n.allowCaretMode,inputAttributes:_e},se=o.createElement(u.AsyncFocusBlur,{onFocus:Ye,onBlur:c()?void 0:oe,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},e=>o.createElement(o.Fragment,null,o.createElement("span",{...n.label?{}:ee,ref:m,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[B]||B}`]:B,[`k-rounded-${u.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-input-${x}`]:x,"k-invalid":!ue,"k-required":te(),"k-disabled":g,"k-focus":b.focused},n.className),onKeyDown:Ze,style:{width:n.width},onFocus:c()?L:e.onFocus,onBlur:e.onBlur,onClick:c()?L:void 0},o.createElement(nt,{_ref:d,ariaRole:"combobox",ariaHasPopup:"grid",ariaExpanded:i(),ariaControls:i()?le:void 0,autoFocus:ke,...lt}),o.createElement(ot,{type:"button",icon:"calendar",svgIcon:ct.calendarIcon,title:ie,className:"k-input-button",onClick:c()?void 0:L,"aria-label":ie,fillMode:x,onMouseDown:Xe}),!c()&&tt),c()&&rt));return n.label?o.createElement(gt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ue,editorDisabled:g,children:se,style:{width:n.width},...ee}):se});U.propTypes={className:t.string,defaultShow:t.bool,defaultValue:t.instanceOf(Date),disabled:t.bool,focusedDate:t.instanceOf(Date),format:t.oneOfType([t.string,t.shape({skeleton:r.nullable(t.string),pattern:r.nullable(t.string),date:r.nullable(t.oneOf(["short","medium","long","full"])),time:r.nullable(t.oneOf(["short","medium","long","full"])),datetime:r.nullable(t.oneOf(["short","medium","long","full"])),era:r.nullable(t.oneOf(["narrow","short","long"])),year:r.nullable(t.oneOf(["numeric","2-digit"])),month:r.nullable(t.oneOf(["numeric","2-digit","narrow","short","long"])),day:r.nullable(t.oneOf(["numeric","2-digit"])),weekday:r.nullable(t.oneOf(["narrow","short","long"])),hour:r.nullable(t.oneOf(["numeric","2-digit"])),hour12:r.nullable(t.bool),minute:r.nullable(t.oneOf(["numeric","2-digit"])),second:r.nullable(t.oneOf(["numeric","2-digit"])),timeZoneName:r.nullable(t.oneOf(["short","long"]))})]),formatPlaceholder:t.oneOfType([r.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:r.nullable(t.string),month:r.nullable(t.string),day:r.nullable(t.string),hour:r.nullable(t.string),minute:r.nullable(t.string),second:r.nullable(t.string)})]),id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,min:t.instanceOf(Date),max:t.instanceOf(Date),name:t.string,popupSettings:t.shape({animate:r.nullable(t.bool),appendTo:r.nullable(t.any),popupClass:r.nullable(t.string)}),show:t.bool,tabIndex:t.number,title:t.string,value:t.instanceOf(Date),weekNumber:t.bool,width:t.oneOfType([t.number,t.string]),validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),adaptive:t.bool,adaptiveTitle:t.string,adaptiveSubtitle:t.string,autoFocus:t.bool,inputAttributes:t.object};const l={defaultShow:!1,defaultValue:null,dateInput:dt.DateInputInner,calendar:ft.Calendar,toggleButton:pt.ToggleButton,popup:st.Popup,disabled:!1,format:"d",max:r.MAX_DATE,min:r.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},fe=u.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=fe;exports.datePickerDefaultProps=l;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const it=require("react"),t=require("prop-types"),st=require("@progress/kendo-react-popup"),j=require("@progress/kendo-date-math"),u=require("@progress/kendo-react-common"),ct=require("@progress/kendo-svg-icons"),dt=require("../dateinput/DateInput.js"),ft=require("../calendar/components/Calendar.js"),r=require("../utils.js"),H=require("../messages/index.js"),mt=require("@progress/kendo-react-intl"),pt=require("./ToggleButton.js"),gt=require("../hooks/usePickerFloatingLabel.js"),bt=require("@progress/kendo-react-layout"),ht=require("../common/AdaptiveMode.js");function vt(n){const D=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const f in n)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(n,f);Object.defineProperty(D,f,I.get?I:{enumerable:!0,get:()=>n[f]})}}return D.default=n,Object.freeze(D)}const o=vt(it),U=o.forwardRef((n,D)=>{const f=u.useId(n.id),I=mt.useLocalization(),k=u.useAdaptiveModeContext(),{defaultShow:me=l.defaultShow,defaultValue:pe=l.defaultValue,dateInput:ge=l.dateInput,calendar:be=l.calendar,toggleButton:he=l.toggleButton,popup:ve=l.popup,disabled:m=l.disabled,format:we=l.format,max:C=l.max,min:P=l.min,popupSettings:O=l.popupSettings,tabIndex:ye=l.tabIndex,weekNumber:De=l.weekNumber,validityStyles:Y=l.validityStyles,size:B=l.size,rounded:E=l.rounded,fillMode:x=l.fillMode,autoFocus:ke=l.autoFocus,show:$,autoSwitchParts:Ce,autoSwitchKeys:Pe,twoDigitYearMax:Oe,ariaLabel:Me,adaptive:wt,adaptiveTitle:Re=n.label||void 0,adaptiveSubtitle:Ie,formatPlaceholder:Se,inputAttributes:_e,validationMessage:X,visited:yt,value:q,touched:Dt,modified:kt,_adaptiveMode:Ct=k,valid:Z,focusedDate:Te,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,placeholder:qe,onChange:G,onOpen:J,onClose:Q,...ee}=u.usePropsContext(fe,n),N=()=>{if(u.canUseDOM)return p.current&&p.current.ownerDocument||window.document},c=()=>!!(b.windowWidth&&k&&b.windowWidth<=(k==null?void 0:k.medium)&&n.adaptive),h=()=>{const e=S.current!==void 0?S.current:q!==void 0?q:b.value;return e!==null?j.cloneDate(e):null},i=()=>_.current!==void 0?_.current:$!==void 0?$:b.show,Ne=()=>ge||l.dateInput,Ae=()=>he||l.toggleButton,Fe=()=>be||l.calendar,Le=()=>ve||l.popup,te=()=>n.required!==void 0?n.required:!1,A=()=>{const e=h()||q||null,a=P,s=C,T=r.isInDateRange(e,a,s),K=X!==void 0,V=(!te()||e!=null)&&T,W=Z!==void 0?Z:V;return{customError:K,rangeOverflow:e&&s.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<a.getTime()||!1,valid:W,valueMissing:e===null}},ze=e=>{for(const a of e)R({windowWidth:a.target.clientWidth})},Ke=()=>{d.current&&d.current.focus()},ne=e=>{g.current=e},v=e=>{i()!==e&&(R({show:e}),e&&J&&J({target:w.current}),!e&&Q&&Q({target:w.current}))},Ve=e=>{const a=h();return a&&e?r.setTime(e,a):e},We=e=>{O!=null&&O.onMouseDownOutside&&O.onMouseDownOutside(e)},F=(e,a)=>{R({value:j.cloneDate(e||void 0)}),S.current=e,_.current=!1,c()||(y.current=!0),G&&G({syntheticEvent:a.syntheticEvent,nativeEvent:a.nativeEvent,value:h(),show:i(),target:w.current}),S.current=void 0,_.current=void 0,v(!1)},je=e=>{const a=Ve(e.value);F(a,e)},ae=()=>{const{popupClass:e,...a}=O,s=i(),T=h(),K=T&&j.getDate(T),V=u.classNames(e),W={popupClass:"k-datepicker-popup",show:s,anchor:p.current,className:V,id:le,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...a,onMouseDownOutside:We},ce={disabled:m,value:K,min:P,max:C,weekNumber:De,focusedDate:Te,className:c()?"k-calendar-lg":"",navigation:!c(),onChange:je},de=Fe(),ut=Le();return c()?o.createElement(de,{_ref:ne,...ce}):o.createElement(ut,{...W},o.createElement(de,{_ref:ne,...ce}))},oe=()=>{R({focused:!1}),v(!1)},He=()=>{const{windowWidth:e=0}=b,a={expand:i(),onClose:oe,title:Re,subTitle:Ie,windowWidth:e};return o.createElement(ht.AdaptiveMode,{...a},o.createElement(bt.ActionSheetContent,null,ae()))},Ue=e=>{F(e.value,e)},Ye=()=>{R({focused:!0})},$e=()=>{v(!i())},L=()=>{m||(y.current=!0,v(!i()))},Xe=e=>{e.preventDefault()},Ze=e=>{const{altKey:a,keyCode:s}=e;if(s===u.Keys.esc&&i()){y.current=!0,v(!1);return}a&&(s===u.Keys.up||s===u.Keys.down)&&(e.preventDefault(),e.stopPropagation(),y.current=s===u.Keys.up,v(s===u.Keys.down))},w=o.useRef(null),p=o.useRef(null),d=o.useRef(null),g=o.useRef(null);o.useImperativeHandle(w,()=>({props:n,get element(){return p.current},get calendar(){return g.current},get dateInput(){return d.current},get name(){return n.name},get show(){return i()},get validity(){return A()},get value(){return h()},get mobileMode(){return c()},togglePopup:$e,focus:Ke})),o.useImperativeHandle(D,()=>w.current),u.useWebMcpRegister("datepicker",w,n,n.webMcp);const S=o.useRef(void 0),_=o.useRef(void 0),Ge=o.useRef(null),y=o.useRef(!1),z=o.useRef(!1),M=o.useRef(null),[b,Je]=o.useState({value:pe,show:me,focused:!1}),[,Qe]=o.useReducer(e=>e,!0),re=n.name||f||void 0,et=o.useCallback(e=>{if(m)return;let a=null;if(e!=null){if(e instanceof Date)a=e;else if(typeof e=="string"||typeof e=="number"){const s=new Date(e);isNaN(s.getTime())||(a=s)}}if(a&&r.isInDateRange(a,P,C)){const s={target:p.current,currentTarget:p.current};F(a,{syntheticEvent:s})}},[m,P,C]);u.useKendoPaste(p,{fieldName:re,onValueChange:et,enabled:!!re});const R=e=>{Je(a=>({...a,...e}))};o.useEffect(()=>{g.current&&g.current.element&&i()&&!z.current&&g.current.element.focus({preventScroll:!0}),c()&&i()&&!z.current&&setTimeout(()=>{g.current&&g.current.element&&g.current.element.focus({preventScroll:!0})},300),d.current&&d.current.element&&!i()&&y.current&&d.current.element.focus({preventScroll:!0}),z.current=i(),y.current=!1}),o.useEffect(()=>{var e;return M.current=u.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(a=>ze(a)),i()&&Qe(),(e=N())!=null&&e.body&&M.current&&M.current.observe(N().body),()=>{var a;clearTimeout(Ge.current),(a=N())!=null&&a.body&&M.current&&M.current.disconnect()}},[]);const le=f+"-popup-id",tt=ae(),nt=Ne(),at=h(),ot=Ae(),rt=He(),ue=!Y||A().valid,ie=I.toLanguageString(H.toggleCalendar,H.messages[H.toggleCalendar]),lt={disabled:m,format:we,formatPlaceholder:Se,id:Be,ariaLabelledBy:Ee,ariaDescribedBy:xe,ariaLabel:Me,max:C,min:P,name:n.name,onChange:Ue,required:n.required,_ref:d,tabIndex:i()?-1:ye,title:n.title,valid:A().valid,validationMessage:X,validityStyles:Y,value:at,label:void 0,placeholder:b.focused?null:qe,ariaExpanded:i(),autoFill:n.autoFill,twoDigitYearMax:Oe,enableMouseWheel:n.enableMouseWheel,autoCorrectParts:n.autoCorrectParts,autoSwitchParts:Ce,autoSwitchKeys:Pe,allowCaretMode:n.allowCaretMode,inputAttributes:_e},se=o.createElement(u.AsyncFocusBlur,{onFocus:Ye,onBlur:c()?void 0:oe,onSyncBlur:n.onBlur,onSyncFocus:n.onFocus},e=>o.createElement(o.Fragment,null,o.createElement("span",{...n.label?{}:ee,ref:p,className:u.classNames("k-input","k-datepicker",{[`k-input-${u.kendoThemeMaps.sizeMap[B]||B}`]:B,[`k-rounded-${u.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-input-${x}`]:x,"k-invalid":!ue,"k-required":te(),"k-disabled":m,"k-focus":b.focused},n.className),onKeyDown:Ze,style:{width:n.width},onFocus:c()?L:e.onFocus,onBlur:e.onBlur,onClick:c()?L:void 0},o.createElement(nt,{_ref:d,ariaRole:"combobox",ariaHasPopup:"grid",ariaExpanded:i(),ariaControls:i()?le:void 0,autoFocus:ke,...lt}),o.createElement(ot,{type:"button",icon:"calendar",svgIcon:ct.calendarIcon,title:ie,disabled:m,className:"k-input-button",onClick:c()?void 0:L,"aria-label":ie,fillMode:x,onMouseDown:Xe}),!c()&&tt),c()&&rt));return n.label?o.createElement(gt.PickerFloatingLabel,{dateInput:d,label:n.label,editorId:f,editorValid:ue,editorDisabled:m,children:se,style:{width:n.width},...ee}):se});U.propTypes={className:t.string,defaultShow:t.bool,defaultValue:t.instanceOf(Date),disabled:t.bool,focusedDate:t.instanceOf(Date),format:t.oneOfType([t.string,t.shape({skeleton:r.nullable(t.string),pattern:r.nullable(t.string),date:r.nullable(t.oneOf(["short","medium","long","full"])),time:r.nullable(t.oneOf(["short","medium","long","full"])),datetime:r.nullable(t.oneOf(["short","medium","long","full"])),era:r.nullable(t.oneOf(["narrow","short","long"])),year:r.nullable(t.oneOf(["numeric","2-digit"])),month:r.nullable(t.oneOf(["numeric","2-digit","narrow","short","long"])),day:r.nullable(t.oneOf(["numeric","2-digit"])),weekday:r.nullable(t.oneOf(["narrow","short","long"])),hour:r.nullable(t.oneOf(["numeric","2-digit"])),hour12:r.nullable(t.bool),minute:r.nullable(t.oneOf(["numeric","2-digit"])),second:r.nullable(t.oneOf(["numeric","2-digit"])),timeZoneName:r.nullable(t.oneOf(["short","long"]))})]),formatPlaceholder:t.oneOfType([r.nullable(t.oneOf(["wide","narrow","short","formatPattern"])),t.shape({year:r.nullable(t.string),month:r.nullable(t.string),day:r.nullable(t.string),hour:r.nullable(t.string),minute:r.nullable(t.string),second:r.nullable(t.string)})]),id:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,min:t.instanceOf(Date),max:t.instanceOf(Date),name:t.string,popupSettings:t.shape({animate:r.nullable(t.bool),appendTo:r.nullable(t.any),popupClass:r.nullable(t.string)}),show:t.bool,tabIndex:t.number,title:t.string,value:t.instanceOf(Date),weekNumber:t.bool,width:t.oneOfType([t.number,t.string]),validationMessage:t.string,required:t.bool,valid:t.bool,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),adaptive:t.bool,adaptiveTitle:t.string,adaptiveSubtitle:t.string,autoFocus:t.bool,inputAttributes:t.object};const l={defaultShow:!1,defaultValue:null,dateInput:dt.DateInputInner,calendar:ft.Calendar,toggleButton:pt.ToggleButton,popup:st.Popup,disabled:!1,format:"d",max:r.MAX_DATE,min:r.MIN_DATE,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},fe=u.createPropsContext();U.displayName="KendoReactDatePicker";exports.DatePicker=U;exports.DatePickerPropsContext=fe;exports.datePickerDefaultProps=l;
@@ -28,7 +28,7 @@ const me = o.forwardRef((r, pe) => {
28
28
  calendar: we = i.calendar,
29
29
  toggleButton: ye = i.toggleButton,
30
30
  popup: Ce = i.popup,
31
- disabled: m = i.disabled,
31
+ disabled: d = i.disabled,
32
32
  format: De = i.format,
33
33
  max: y = i.max,
34
34
  min: C = i.min,
@@ -68,7 +68,7 @@ const me = o.forwardRef((r, pe) => {
68
68
  ...X
69
69
  } = gt(Bt, r), x = () => {
70
70
  if (ue)
71
- return d.current && d.current.ownerDocument || window.document;
71
+ return f.current && f.current.ownerDocument || window.document;
72
72
  }, s = () => !!(p.windowWidth && w && p.windowWidth <= (w == null ? void 0 : w.medium) && r.adaptive), g = () => {
73
73
  const e = M.current !== void 0 ? M.current : T !== void 0 ? T : p.value;
74
74
  return e !== null ? le(e) : null;
@@ -87,7 +87,7 @@ const me = o.forwardRef((r, pe) => {
87
87
  }, He = () => {
88
88
  c.current && c.current.focus();
89
89
  }, G = (e) => {
90
- f.current = e;
90
+ m.current = e;
91
91
  }, h = (e) => {
92
92
  l() !== e && (k({ show: e }), e && $ && $({ target: v.current }), !e && j && j({ target: v.current }));
93
93
  }, Ue = (e) => {
@@ -110,7 +110,7 @@ const me = o.forwardRef((r, pe) => {
110
110
  const { popupClass: e, ...n } = D, u = l(), R = g(), V = R && ft(R), z = se(e), K = {
111
111
  popupClass: "k-datepicker-popup",
112
112
  show: u,
113
- anchor: d.current,
113
+ anchor: f.current,
114
114
  className: z,
115
115
  id: te,
116
116
  anchorAlign: {
@@ -124,7 +124,7 @@ const me = o.forwardRef((r, pe) => {
124
124
  ...n,
125
125
  onMouseDownOutside: Ye
126
126
  }, ae = {
127
- disabled: m,
127
+ disabled: d,
128
128
  value: V,
129
129
  min: C,
130
130
  max: y,
@@ -153,7 +153,7 @@ const me = o.forwardRef((r, pe) => {
153
153
  }, Ge = () => {
154
154
  h(!l());
155
155
  }, F = () => {
156
- m || (b.current = !0, h(!l()));
156
+ d || (b.current = !0, h(!l()));
157
157
  }, Je = (e) => {
158
158
  e.preventDefault();
159
159
  }, Qe = (e) => {
@@ -163,16 +163,16 @@ const me = o.forwardRef((r, pe) => {
163
163
  return;
164
164
  }
165
165
  n && (u === O.up || u === O.down) && (e.preventDefault(), e.stopPropagation(), b.current = u === O.up, h(u === O.down));
166
- }, v = o.useRef(null), d = o.useRef(null), c = o.useRef(null), f = o.useRef(null);
166
+ }, v = o.useRef(null), f = o.useRef(null), c = o.useRef(null), m = o.useRef(null);
167
167
  o.useImperativeHandle(
168
168
  v,
169
169
  () => ({
170
170
  props: r,
171
171
  get element() {
172
- return d.current;
172
+ return f.current;
173
173
  },
174
174
  get calendar() {
175
- return f.current;
175
+ return m.current;
176
176
  },
177
177
  get dateInput() {
178
178
  return c.current;
@@ -203,7 +203,7 @@ const me = o.forwardRef((r, pe) => {
203
203
  focused: !1
204
204
  }), [, nt] = o.useReducer((e) => e, !0), ee = r.name || S || void 0, ot = o.useCallback(
205
205
  (e) => {
206
- if (m)
206
+ if (d)
207
207
  return;
208
208
  let n = null;
209
209
  if (e != null) {
@@ -216,15 +216,15 @@ const me = o.forwardRef((r, pe) => {
216
216
  }
217
217
  if (n && de(n, C, y)) {
218
218
  const u = {
219
- target: d.current,
220
- currentTarget: d.current
219
+ target: f.current,
220
+ currentTarget: f.current
221
221
  };
222
222
  N(n, { syntheticEvent: u });
223
223
  }
224
224
  },
225
- [m, C, y]
225
+ [d, C, y]
226
226
  );
227
- vt(d, {
227
+ vt(f, {
228
228
  fieldName: ee,
229
229
  onValueChange: ot,
230
230
  enabled: !!ee
@@ -233,8 +233,8 @@ const me = o.forwardRef((r, pe) => {
233
233
  tt((n) => ({ ...n, ...e }));
234
234
  };
235
235
  o.useEffect(() => {
236
- f.current && f.current.element && l() && !L.current && f.current.element.focus({ preventScroll: !0 }), s() && l() && !L.current && setTimeout(() => {
237
- f.current && f.current.element && f.current.element.focus({ preventScroll: !0 });
236
+ m.current && m.current.element && l() && !L.current && m.current.element.focus({ preventScroll: !0 }), s() && l() && !L.current && setTimeout(() => {
237
+ m.current && m.current.element && m.current.element.focus({ preventScroll: !0 });
238
238
  }, 300), c.current && c.current.element && !l() && b.current && c.current.element.focus({ preventScroll: !0 }), L.current = l(), b.current = !1;
239
239
  }), o.useEffect(() => {
240
240
  var e;
@@ -244,7 +244,7 @@ const me = o.forwardRef((r, pe) => {
244
244
  };
245
245
  }, []);
246
246
  const te = S + "-popup-id", rt = J(), at = Ve(), it = g(), lt = ze(), ut = je(), ne = !W || A().valid, oe = ge.toLanguageString(fe, Mt[fe]), st = {
247
- disabled: m,
247
+ disabled: d,
248
248
  format: De,
249
249
  formatPlaceholder: Be,
250
250
  id: Ae,
@@ -286,7 +286,7 @@ const me = o.forwardRef((r, pe) => {
286
286
  "span",
287
287
  {
288
288
  ...r.label ? {} : X,
289
- ref: d,
289
+ ref: f,
290
290
  className: se(
291
291
  "k-input",
292
292
  "k-datepicker",
@@ -296,7 +296,7 @@ const me = o.forwardRef((r, pe) => {
296
296
  [`k-input-${B}`]: B,
297
297
  "k-invalid": !ne,
298
298
  "k-required": Z(),
299
- "k-disabled": m,
299
+ "k-disabled": d,
300
300
  "k-focus": p.focused
301
301
  },
302
302
  r.className
@@ -326,6 +326,7 @@ const me = o.forwardRef((r, pe) => {
326
326
  icon: "calendar",
327
327
  svgIcon: yt,
328
328
  title: oe,
329
+ disabled: d,
329
330
  className: "k-input-button",
330
331
  onClick: s() ? void 0 : F,
331
332
  "aria-label": oe,
@@ -343,7 +344,7 @@ const me = o.forwardRef((r, pe) => {
343
344
  label: r.label,
344
345
  editorId: S,
345
346
  editorValid: ne,
346
- editorDisabled: m,
347
+ editorDisabled: d,
347
348
  children: re,
348
349
  style: { width: r.width },
349
350
  ...X