UNPKG

@progress/kendo-react-dateinputs

Version:

React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package

9 lines (8 loc) 1.27 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";const d=require("react"),m=require("@progress/kendo-react-intl"),a=require("../messages/index.js"),c=require("@progress/kendo-react-common"),g=require("@progress/kendo-svg-icons");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=p(d),b=e=>{const n=m.useLocalization(),t=c.useUnstyled(),o=t&&t.uDateInput,i=n.toLanguageString(a.clear,a.messages[a.clear]),u=r=>{r.stopPropagation();const{onClick:s}=e;s&&s.call(void 0,r)};return l.createElement("span",{className:c.classNames(c.uDateInput.clearButton({c:o})),role:"button",onClick:u,tabIndex:e.tabindex||-1,title:i,key:"clearbutton"},l.createElement(c.IconWrap,{name:"x",icon:g.xIcon}))};module.exports=b;