reactstrap-date-picker
Version:
Reactstrap based, zero dependencies, date picker
14 lines (13 loc) • 18.4 kB
JavaScript
/**
* reactstrap-date-picker v2.0.0-beta.2
*
* https://reactstrap-date-picker.afialapis.com/
*
* Copyright (c) Donato Lorenzo <donato@afialapis.com>
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
var reactstrapDatePicker=function(e,t,n){"use strict";var a=function(e){var a=e.children,r=e.customInputGroup,l=e.size,o=e.inputId;return null!=r?t.cloneElement(r,{children:a}):t.createElement(n.InputGroup,{size:l,id:o,className:"rdp-input-group"},a)},r=function(e){var n=e.oid,a=e.overlayContainerRef,r=e.children;return t.createElement("div",{ref:a,id:n,className:"rdp-overlay"},r)},l=function(e){var n=e.inputId,a=e.name,r=e.value,l=e.formattedValue,o=e.hiddenInputRef;return t.createElement("input",{ref:o,type:"hidden",className:"rdp-hidden",id:n,name:a,value:r||"","data-formattedvalue":l})},o=function(e){var a=e.inputValue,r=e.disabled,l=e.clearButtonElement,o=e.onClick;return t.createElement("div",{className:"rdp-addon input-group-append"},t.createElement(n.InputGroupText,{onClick:function(){return r?null:o()},style:{opacity:a&&!r?1:.5,cursor:a&&!r?"pointer":"not-allowed"}},l))};function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}var c=function(e){var a=e.customControl,r=e.controlId,l=e.value,o=e.required,c=e.placeholder,i=e.inputRef,s=e.disabled,d=e.className,p=e.style,m=e.autoFocus,f=e.autoComplete,v=e.valid,h=e.invalid,g=e.onInvalid,y=e.noValidate,D=e.onKeyDown,w=e.onFocus,E=e.onBlur,k=e.onChange,C=(!0===h?"is-invalid":"")+" "+(!0===v?"is-valid":"");return null!=a?t.cloneElement(a,{id:r,value:l||"",required:o,placeholder:c,ref:i,disabled:s,className:"rdp-form-control "+(d||"")+" "+(a.props.className||"")+" "+C,style:u({},a.props.style||{},p||{}),autoComplete:f,onInvalid:g,noValidate:y,onKeyDown:D,onFocus:w,onBlur:E,onChange:k,valid:v,invalid:h}):t.createElement(n.Input,{id:r,name:r,value:l||"",required:o,placeholder:c,innerRef:i,disabled:s,type:"text",className:"rdp-form-control "+(d||"")+" "+C,style:p,autoFocus:m,autoComplete:f,onInvalid:g,noValidate:y,onKeyDown:D,onFocus:w,onBlur:E,onChange:k,valid:v,invalid:h})},i=function(e){return e?(e.setHours(12-e.getTimezoneOffset()/60),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e):null},s=function(e){return e?i(new Date(e)):null},d=function(e){return e?i(e).toISOString():null},p=function(e,t,n){var a=e.getMonth()+1,r=e.getDate();return n.match(/MM.DD.YYYY/)?(a>9?a:"0"+a)+t+(r>9?r:"0"+r)+t+e.getFullYear():n.match(/DD.MM.YYYY/)?(r>9?r:"0"+r)+t+(a>9?a:"0"+a)+t+e.getFullYear():e.getFullYear()+t+(a>9?a:"0"+a)+t+(r>9?r:"0"+r)},m=function(e,t){return null!=e&&""!=e?e:null!=t&&""!=t?t:function(){if("object"==typeof window){null==window._reactstrapDatePickerInstance&&(window._reactstrapDatePickerInstance=0);var e=window._reactstrapDatePickerInstance+1;return window._reactstrapDatePickerInstance=e,e}if("object"==typeof process){null==process._reactstrapDatePickerInstance&&(process._reactstrapDatePickerInstance=0);var t=process._reactstrapDatePickerInstance+1;return process._reactstrapDatePickerInstance=t,t}return console.error("Reactstrap Date Picker cannot determine environment (it is neither browser's <window> nor Node's <process>)."),1}().toString()},f=function(e,t,n){var a,r=m(e,t),l="rdp-input-group-"+r,o=null!=e?e:"rdp-hidden-"+r,u="rdp-form-control-"+r;return null!=n&&null!=n&&null!=(a=n.props)&&a.id&&(u=n.props.id),[l,o,u,"rdp-overlay-"+r]},v=function(e,t){return t>1?e.slice(t).concat(e.slice(0,t)):1===t?e.slice(1).concat(e.slice(0,1)):e},h=function(e,t){try{var n=new Date(e),a=new Date(t),r=n.getFullYear()==a.getFullYear();return n.getMonth()==a.getMonth()&&r}catch(l){return console.error(l),!0}},g=function(e,t){for(var n=e?new Date(e).getFullYear():1970,a=t?new Date(t).getFullYear():2045,r=[],l=n;l<=a;l++)r.push(l);return r},y=function(e){var a=e.displayDate,r=e.minDate,l=e.maxDate,o=e.monthLabels,u=e.onChangeMonth,c=e.onChangeYear,i=t.useState(new Date(a).getMonth()),s=i[0],d=i[1],p=t.useState(new Date(a).getFullYear()),m=p[0],f=p[1],v=t.useState(g(r,l)),h=v[0],y=v[1];t.useEffect((function(){d(new Date(a).getMonth()),f(new Date(a).getFullYear())}),[a]),t.useEffect((function(){y(g(r,l))}),[r,l]);return t.createElement("div",{className:"rdp-header-pick-month-default",style:{display:"flex",flexFlow:"row",flexWrap:"nowrap"}},t.createElement("div",{className:"rdp-header-pick-month-default-month",style:{flex:"2 1 auto"}},t.createElement(n.Input,{type:"select",name:"rdp-header-pick-month-default-month",style:{lineHeight:"1.5",fontSize:"0.875rem",padding:"0.2rem"},value:s,onChange:function(e){var t=e.target.value;d(t),u(t)}},o.map((function(e,n){return t.createElement("option",{key:"month_"+n,value:n},e)})))),t.createElement("div",{className:"rdp-header-pick-month-default-year",style:{flex:"1 1 67px"}},t.createElement(n.Input,{type:"select",name:"rdp-header-pick-month-default-year",style:{lineHeight:"1.5",fontSize:"0.875rem",padding:"0.2rem"},value:m,onChange:function(e){var t=e.target.value;f(t),c(t)}},h.map((function(e){return t.createElement("option",{key:"year"+e,value:e},e)})))))};function D(e){var n=e.previousButtonElement,a=e.nextButtonElement,r=e.pickMonthElement,l=e.displayDate,o=e.minDate,u=e.maxDate,c=e.onChange,i=e.monthLabels,s=t.useState(!1),d=s[0],p=s[1],m=t.useState(!1),f=m[0],v=m[1],g=t.useState(""),D=g[0],w=g[1],E=r;t.useEffect((function(){if(null!=l){p(!!o&&h(l,o)),v(!!u&&h(l,u));try{i&&w(i[l.getMonth()]+" "+l.getFullYear())}catch(e){console.error(e)}}}),[l,o,u,i]);var k=function(e){var t=new Date(l);t.setMonth(t.getMonth()+e,1),c(t)},C=function(e){var t=new Date(l);t.setMonth(e),c(t)},b=function(e){var t=new Date(l);t.setFullYear(e),c(t)};return t.createElement("div",{className:"rdp-header text-center",style:{display:"flex",flexFlow:"row",flexWrap:"nowrap"}},t.createElement("div",{className:"text-muted rdp-header-previous-wrapper",onClick:function(){return k(-1)},style:{cursor:"pointer",userSelect:"none",flexBasis:"1.25em",alignSelf:"center"}},d?null:n),t.createElement("div",{className:"rdp-header-pick-month-wrapper",style:{flex:"1 1 auto"}},null==E||"none"===E?t.createElement("div",null,D):"default"===E?t.createElement(y,{displayDate:l,monthLabels:i,minDate:o,maxDate:u,onChangeMonth:function(e){return C(e)},onChangeYear:function(e){return b(e)}}):t.createElement(E,{displayDate:l,minDate:o,maxDate:u,onChangeMonth:function(e){return C(e)},onChangeYear:function(e){return b(e)}})),t.createElement("div",{className:"text-muted rdp-header-next-wrapper",onClick:function(){return k(1)},style:{cursor:"pointer",userSelect:"none",flexBasis:"1.25em",alignSelf:"center"}},f?null:a))}var w=function(e){var n=e.dayLabels,a=e.showWeeks,r=e.cellPadding;return t.createElement("thead",null,t.createElement("tr",null,a?t.createElement("td",{className:"text-muted current-week",style:{padding:r}}):null,n.map((function(e,n){return t.createElement("td",{key:n,className:"text-muted",style:{padding:r}},t.createElement("small",null,e))}))))},E=function(){return t.createElement("td",null)},k={normal:"",muted:"text-muted",selected:"bg-primary",current:"text-primary"},C=function(e){var n=e.day,a=e.mode,r=e.onDayClick,l=e.cellPadding,o=e.roundedCorners;return t.createElement("td",{"data-day":n,onClick:function(e){"muted"!=a&&r(e)},style:{cursor:"muted"==a?"default":"pointer",padding:l,borderRadius:o?"5px":"0px"},className:k[a]},n)},b=function(e){var n=e.weekNum,a=e.cellPadding;return t.createElement("td",{style:{padding:a,fontSize:"0.8em",color:"darkgrey"},className:"text-muted"},n)},M=function(e){var n=e.calendarDays,a=e.showWeeks,r=e.onDayClick,l=e.cellPadding,o=e.roundedCorners;return n?t.createElement("tbody",null,n.map((function(e,n){return t.createElement("tr",{key:"rdp_calendar_week_"+n},a?t.createElement(b,{key:"rdp_calendar_week_"+n+"_weeknum",weekNum:e.weekNum,cellPadding:l}):null,e.weekDays.map((function(e,a){return e.inMonth?t.createElement(C,{key:"rdp_calendar_week_"+n+"_day_"+a,day:e.day,mode:e.mode,onDayClick:r,cellPadding:l,roundedCorners:o}):t.createElement(E,{key:"rdp_calendar_week_"+n+"_day_"+a})})))}))):t.createElement("tbody",null)},Y=function(e){var a=e.dayLabels,r=e.showWeeks,l=e.handleTodayClick,o=e.showTodayButton,u=e.todayButtonLabel;return o?t.createElement("tfoot",null,t.createElement("tr",null,t.createElement("td",{colSpan:a.length+(r?1:0),style:{paddingTop:"9px"}},t.createElement(n.Button,{block:!0,size:"sm",className:"u-today-button",onClick:function(){return l()}},u)))):null},S=[31,28,31,30,31,30,31,31,30,31,30,31];function x(e,n,a,r,l){var o=t.useState(void 0),c=o[0],s=o[1],d=t.useState(void 0),p=d[0],m=d[1],f=t.useState(void 0),v=f[0],h=f[1],g=t.useState([]),y=g[0],D=g[1];return t.useEffect((function(){e&&(s(e.getFullYear()),m(e.getMonth()))}),[e]),t.useEffect((function(){h(function(e,t,n){if(null!=e&&null!=t){var a=new Date(e,t,1),r=n>1?a.getDay()-n+7:1===n?0===a.getDay()?6:a.getDay()-1:a.getDay(),l=S[t];1==t&&(e%4==0&&e%100!=0||e%400==0)&&(l=29);for(var o=function(e,t,n){return e<=l&&(t>0||n>=r)},u=function(n){var a=new Date(e,t,n-1,12,0,0,0),r=new Date(a.valueOf()),l=(a.getDay()+6)%7;r.setDate(r.getDate()-l+3);var o=r.valueOf();return r.setMonth(0,1),4!==r.getDay()&&r.setMonth(0,1+(4-r.getDay()+7)%7),1+Math.ceil((o-r)/6048e5)},c=[],i=1,s=0;s<9;s++){for(var d=[],p=0;p<=6;p++)o(i,s,p)?(d.push({inMonth:!0,day:i}),i+=1):d.push({inMonth:!1});var m=u(i);if(c.push({weekDays:d,weekNum:m}),i>l)break}return{year:e,month:t,weeks:c}}}(c,p,l))}),[c,p,l]),t.useEffect((function(){D(function(e,t,n,a){if(null==e)return[];var r=[];return e.weeks.map((function(l){var o=l.weekNum,c=l.weekDays.map((function(r){return u({},r,{mode:r.inMonth?(l=r.day,o=i(new Date(e.year,e.month,l,12,0,0,0)).toISOString(),c=null!=n&&Date.parse(o)<Date.parse(i(new Date(n))),s=null!=a&&Date.parse(o)>Date.parse(i(new Date(a))),d=i(new Date),p=i(new Date(t)),c||s?"muted":Date.parse(o)===Date.parse(p)?"selected":Date.parse(o)===Date.parse(d)?"current":"normal"):void 0});var l,o,c,s,d,p}));r.push({weekNum:o,weekDays:c})})),r}(v,n,a,r))}),[v,n,a,r]),y}var N=function(e){var a=e.popoverRef,r=e.selectedDate,l=e.displayDate,o=e.minDate,u=e.maxDate,c=e.onChange,s=e.dayLabels,d=e.cellPadding,p=e.weekStartsOn,m=e.showTodayButton,f=e.todayButtonLabel,v=e.roundedCorners,h=e.showWeeks,g=e.monthLabels,y=e.previousButtonElement,E=e.nextButtonElement,k=e.pickMonthElement,C=e.placement,b=e.open,S=e.container,N=e.target,I=e.onChangeMonth,B=x(l,r,o,u,p);return t.createElement(t.Fragment,null,t.createElement(n.Popover,{innerRef:a,className:"rdp-popover "+C,isOpen:b,container:S,target:N,placement:C},t.createElement(n.PopoverHeader,{tag:"div"},t.createElement(D,{previousButtonElement:y,nextButtonElement:E,pickMonthElement:k,displayDate:l,minDate:o,maxDate:u,onChange:function(e){return I(e)},monthLabels:g})),t.createElement(n.PopoverBody,null,t.createElement("table",{className:"rdp-calendar text-center"},t.createElement(w,{dayLabels:s,showWeeks:h,cellPadding:d}),t.createElement(M,{calendarDays:B,showWeeks:h,onDayClick:function(e){var t=e.currentTarget.getAttribute("data-day"),n=i(new Date(l));n.setDate(t),c(n)},cellPadding:d,roundedCorners:v}),t.createElement(Y,{dayLabels:s,showWeeks:h,handleTodayClick:function(){var e=i(new Date);c(e)},showTodayButton:m,todayButtonLabel:f})))))},I=function(e){var t=Object.prototype.toString.call(e);return"[object AsyncFunction]"===t||"[object Function]"===t||"[object GeneratorFunction]"===t||"[object Proxy]"===t?e():e},B=function(e,n,a,r,l){var o=t.useState(!1),u=o[0],c=o[1],i=t.useState(I(e)),s=i[0],d=i[1],p=t.useRef(),m=t.useRef(),f=t.useRef(),v="object"==typeof n?n:t.useRef(n),h=function(e,n,a){return[t.useCallback((function(){if(n){var t=document.createEvent("CustomEvent");t.initEvent("Change Date",!0,!1),e.current.dispatchEvent(t),n(t)}}),[e,n]),t.useCallback((function(){if(a){var t=document.createEvent("CustomEvent");t.initEvent("Change Date",!0,!1),e.current.dispatchEvent(t),a(t)}}),[e,a])]}(v,r,l),g=h[0],y=h[1],D=t.useCallback((function(e){var t=null==(null==f?void 0:f.current)||!(null!=f&&f.current.contains(e.target)),n=null==(null==v?void 0:v.current)||!v.current.contains(e.target);return t&&n}),[f,v]);t.useEffect((function(){function e(e){e.stopPropagation(),u&&D(e)&&(c(!1),g())}return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[u,D,g]);var w=t.useCallback((function(){var t=I(e);d(t),c(!0),y()}),[e,y]),E=t.useCallback((function(e){D(e)&&(c(!1),g())}),[D,g]);return[p,m,f,v,u,s,w,E]},F=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],P=["January","February","March","April","May","June","July","August","September","October","November","December"],_=function(e,n){var u,i=e.value,m=e.defaultValue,h=e.id,g=e.name,y=e.dateFormat,D=void 0===y?(u="undefined"!=typeof window&&window.navigator?(window.navigator.userLanguage||window.navigator.language||"").toLowerCase():"")&&"en-us"!==u?"DD/MM/YYYY":"MM/DD/YYYY":y,w=e.minDate,E=e.maxDate,k=e.clearButtonElement,C=void 0===k?"×":k,b=e.showClearButton,M=void 0===b||b,Y=e.onInvalid,S=e.onChange,x=e.onClear,I=e.onBlur,_=e.onFocus,L=e.size,R=e.valid,O=e.invalid,T=e.customInputGroup,V=e.autoComplete,W=void 0===V?"on":V,j=e.autoFocus,z=void 0!==j&&j,A=e.disabled,G=void 0!==A&&A,q=e.noValidate,H=void 0!==q&&q,J=e.placeholder,K=e.required,Z=e.className,Q=e.style,U=void 0===Q?void 0:Q,X=e.inputRef,$=e.customControl,ee=e.children,te=e.calendarContainer,ne=e.dayLabels,ae=void 0===ne?F:ne,re=e.monthLabels,le=void 0===re?P:re,oe=e.weekStartsOn,ue=e.showWeeks,ce=void 0!==ue&&ue,ie=e.previousButtonElement,se=void 0===ie?"<":ie,de=e.nextButtonElement,pe=void 0===de?">":de,me=e.pickMonthElement,fe=void 0===me?void 0:me,ve=e.showTodayButton,he=void 0!==ve&&ve,ge=e.todayButtonLabel,ye=void 0===ge?"Today":ge,De=e.roundedCorners,we=void 0!==De&&De,Ee=e.cellPadding,ke=void 0===Ee?"5px":Ee,Ce=e.calendarPlacement,be=void 0===Ce?"bottom":Ce,Me=function(e,t){if(e&&t)return"Conflicting DatePicker properties 'value' and 'defaultValue'"}(i,m);if(null!=Me)throw new Error(Me);var Ye=B(be,X,0,I,_),Se=Ye[0],xe=Ye[1],Ne=Ye[2],Ie=Ye[3],Be=Ye[4],Fe=Ye[5],Pe=Ye[6],_e=Ye[7],Le=function(e,n,a,r,l,o,u,c){var i=t.useState(o.match(/[^A-Z]/)[0]),m=i[0],f=i[1],v=t.useState(null),h=v[0],g=v[1],y=t.useState(null),D=y[0],w=y[1],E=t.useState(null),k=E[0],C=E[1],b=t.useState(null),M=b[0],Y=b[1];t.useEffect((function(){f(o.match(/[^A-Z]/)[0])}),[o]),t.useEffect((function(){var e,t=n||a,r=s(r),l=s(l),u=s(t),c=d(u),i=t?p(u,m,o):null;if(u)e=u;else{var f=s((new Date).toISOString());e=r&&Date.parse(r)>=Date.parse(f)?r:l&&Date.parse(l)<=Date.parse(f)?l:f}g(c),w(i),Y(u),C(e)}),[n,a,r,l,m,o]);var S=function(){u?u():(g(null),w(null),Y(null),C(null),c&&c(null,null))},x=function(e,t){void 0===t&&(t=!1);var n=e.replace(new RegExp("[^0-9"+m+"]"),"").split(m);o.match(/MM.DD.YYYY/)||o.match(/DD.MM.YYYY/)?(n[0]&&n[0].length>2&&(n[1]=n[0].slice(2)+(n[1]||""),n[0]=n[0].slice(0,2)),n[1]&&n[1].length>2&&(n[2]=n[1].slice(2)+(n[2]||""),n[1]=n[1].slice(0,2)),n[2]&&(n[2]=n[2].slice(0,4),t&&n[2].length<4&&(n[2]=n[2].padEnd(4,"0")))):(n[0]&&n[0].length>4&&(n[1]=n[0].slice(4)+(n[1]||""),n[0]=n[0].slice(0,4)),n[1]&&n[1].length>2&&(n[2]=n[1].slice(2)+(n[2]||""),n[1]=n[1].slice(0,2)),n[2]&&(n[2]=n[2].slice(0,2)));var a=n.join(m);w(a)};return[h,D,k,M,S,function(){var t,n=(null==e||null==(t=e.current)?void 0:t.value)||"",a=n.replace(/(-|\/\/)/g,m).slice(0,10);if(a){var u,i,p;if(o.match(/MM.DD.YYYY/)){if(!a.match(/[0-1][0-9].[0-3][0-9].[1-2][0-9][0-9][0-9]/))return x(n);u=a.slice(0,2).replace(/[^0-9]/g,""),i=a.slice(3,5).replace(/[^0-9]/g,""),p=a.slice(6,10).replace(/[^0-9]/g,"")}else if(o.match(/DD.MM.YYYY/)){if(!a.match(/[0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9]/))return x(n);i=a.slice(0,2).replace(/[^0-9]/g,""),u=a.slice(3,5).replace(/[^0-9]/g,""),p=a.slice(6,10).replace(/[^0-9]/g,"")}else{if(!a.match(/[1-2][0-9][0-9][0-9].[0-1][0-9].[0-3][0-9]/))return x(n);p=a.slice(0,4).replace(/[^0-9]/g,""),u=a.slice(5,7).replace(/[^0-9]/g,""),i=a.slice(8,10).replace(/[^0-9]/g,"")}var f=parseInt(u,10),v=parseInt(i,10),h=parseInt(p,10);if(f>12||v>31)return x(n);var y=r&&Date.parse(n)<Date.parse(r),D=l&&Date.parse(n)>Date.parse(l);if(y||D)return x(n);if(!isNaN(f)&&!isNaN(v)&&!isNaN(h)&&f<=12&&v<=31&&h>999){var E=s(new Date(h,f-1,v,12,0,0,0).toISOString()),k=d(E);Y(E),C(E),g(k),c&&c(k,a)}w(a)}else S()},function(e){C(e)},function(e){var t=d(e),n=p(e,m,o);w(n),Y(e),C(e),g(t),c&&c(t,n)},function(){var t,n=(null==e||null==(t=e.current)?void 0:t.value)||"";n&&x(n,!0)}]}(Ie,i,m,w,E,D,x,S),Re=Le[0],Oe=Le[1],Te=Le[2],Ve=Le[3],We=Le[4],je=Le[5],ze=Le[6],Ae=Le[7],Ge=Le[8],qe=function(e,n,a){var r=t.useState(f(e,n,a)),l=r[0],o=r[1];return t.useEffect((function(){o(f(e,n,a))}),[e,n,a]),l}(h,g,$),He=qe[0],Je=qe[1],Ke=qe[2],Ze=qe[3];t.useImperativeHandle(n,(function(){return{getValue:function(){return Ve?Ve.toISOString():null},getFormattedValue:function(){return Te?Oe:null},getNode:function(){return null==Ie?void 0:Ie.current}}}));var Qe=function(e,n){var a=t.useState(v(e,n)),r=a[0],l=a[1];return t.useEffect((function(){l(v(e,n))}),[e,n]),r}(ae,oe);return t.createElement(a,{customInputGroup:T,size:L,inputId:He},t.createElement(c,{controlId:Ke,customControl:$,value:Oe||"",required:K,placeholder:J||"",inputRef:Ie,disabled:G,className:Z,style:U,autoFocus:z,autoComplete:W,onInvalid:Y,noValidate:H,valid:R,invalid:O,onFocus:function(){return Pe()},onBlur:function(e){Ge(),_e(e)},onChange:function(){return je()}}),t.createElement(r,{overlayContainerRef:xe,oid:Ze},null==xe.current?null:t.createElement(N,{popoverRef:Ne,placement:Fe,open:Be,container:te||xe,target:Ke,previousButtonElement:se,nextButtonElement:pe,pickMonthElement:fe,displayDate:Te,minDate:w,maxDate:E,onChangeMonth:function(e){return ze(e)},monthLabels:le,cellPadding:ke,selectedDate:Ve,onChange:function(e){return Ae(e),void _e(!0)},dayLabels:Qe,weekStartsOn:oe,showTodayButton:he,todayButtonLabel:ye,roundedCorners:we,showWeeks:ce})),t.createElement(l,{inputId:Je,name:g,value:Re||"",formattedValue:Re?Oe:"",hiddenInputRef:Se}),M&&!$?t.createElement(o,{inputValue:Oe,disabled:G,clearButtonElement:C,onClick:function(){return We()}}):null,ee)},L=t.forwardRef(_);return e.DatePicker=L,e}({},react,reactstrap);