From f8a57ad61d53ac26f7e520e51ff475a3c9f31403 Mon Sep 17 00:00:00 2001 From: Vahissan Nandakumar Date: Mon, 30 Nov 2020 21:58:39 -0500 Subject: [PATCH 1/3] Added keyboard accessbility features --- dist/react-datetime.cjs.js | 2 +- dist/react-datetime.cjs.js.map | 2 +- dist/react-datetime.umd.js | 2 +- dist/react-datetime.umd.js.map | 2 +- src/DateTime.js | 18 +- src/parts/ViewNavigation.js | 7 +- src/utils.js | 9 + src/views/DaysView.js | 10 +- src/views/MonthsView.js | 11 +- src/views/TimeView.js | 29 +- src/views/YearsView.js | 11 +- test/__snapshots__/snapshots.spec.js.snap | 2193 +++++++++++++++++++++ test/tests.spec.js | 23 +- 13 files changed, 2299 insertions(+), 20 deletions(-) create mode 100644 src/utils.js diff --git a/dist/react-datetime.cjs.js b/dist/react-datetime.cjs.js index 7c4763eb7..c412c03e2 100644 --- a/dist/react-datetime.cjs.js +++ b/dist/react-datetime.cjs.js @@ -1,2 +1,2 @@ -module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("moment")},function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=require("react-dom")},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";var r=n(6);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(1),i=n.n(a),s=n(0),c=n.n(s);function u(){return(u=Object.assign||function(e){for(var t=1;t1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t=this.props.viewDate,n=t.localeData().monthsShort(t.month(e));return this.capitalize(n.substring(0,3))}}])&&D(t.prototype,n),r&&D(t,r),a}(c.a.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&x(t.prototype,n),r&&x(t,r),a}(c.a.Component);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),this.pad(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),we(ge(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),we(ge(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),we(ge(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),we(ge(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),we(ge(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),we(ge(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),we(ge(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),we(ge(r),"_onInputClick",(function(e){console.log("CLICKING 2!"),r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(e),r}return he(n,[{key:"render",value:function(){return c.a.createElement(Ve,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker"},this.renderView(this.state.currentView,this._renderCalendar)))}},{key:"renderInput",value:function(){if(this.props.input){var e=pe(pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(e,t){return this.props.renderView?this.props.renderView(e,(function(){return t(e)})):t(this.state.currentView)}},{key:"getInitialState",value:function(e){var t=e||this.props,n=this.getFormat("datetime"),r=this.parseDate(t.value||t.initialValue,n);return this.checkTZ(t),{open:!t.input,currentView:t.initialViewMode||this.getInitialView(this.getFormat("date")),viewDate:this.getInitialViewDate(t.initialViewDate,r,n),selectedDate:r&&r.isValid()?r:void 0,inputValue:this.getInitialInputValue(t,r,n)}}},{key:"getInitialViewDate",value:function(e,t,n){var r;if(e){if((r=this.parseDate(e,n))&&r.isValid())return r;this.log('The initialViewDated given "'+e+'" is not valid. Using current date instead.')}else if(t&&t.isValid())return t.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(e){return e?this.getUpdateOn(e):_e}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ce:-1!==e.indexOf("M")?De:-1!==e.indexOf("Y")?ke:Ce}},{key:"getLocaleData",value:function(e){var t=e||this.props;return this.localMoment(t.value||t.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(e){var t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(e){var t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat(this.getLocaleData());if("time"===e)return this.getTimeFormat(this.getLocaleData());var t=this.getLocaleData(),n=this.getDateFormat(t),r=this.getTimeFormat(t);return n&&r?n+" "+r:n||r}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(e){!e.displayTimeZone||this.tzWarning||i.a.tz||(this.tzWarning=!0,this.log('displayTimeZone prop with value "'+e.displayTimeZone+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(this.props),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ(this.props)}}},{key:"regenerateDates",value:function(e){var t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e,t,n){return e.inputProps.value?e.inputProps.value:t&&t.isValid()?t.format(n):e.value&&"string"==typeof e.value?e.value:e.initialValue&&"string"==typeof e.initialValue?e.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}},{key:"log",value:function(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c.a.Component);we(je,"propTypes",{value:Se,initialValue:Se,initialViewDate:Se,initialViewMode:Ee.oneOf([ke,De,Ce,_e]),onOpen:Ee.func,onClose:Ee.func,onChange:Ee.func,onNavigate:Ee.func,onBeforeNavigate:Ee.func,onNavigateBack:Ee.func,onNavigateForward:Ee.func,updateOnView:Ee.string,locale:Ee.string,utc:Ee.bool,displayTimeZone:Ee.string,input:Ee.bool,dateFormat:Ee.oneOfType([Ee.string,Ee.bool]),timeFormat:Ee.oneOfType([Ee.string,Ee.bool]),inputProps:Ee.object,timeConstraints:Ee.object,isValidDate:Ee.func,open:Ee.bool,strictParsing:Ee.bool,closeOnSelect:Ee.bool,closeOnTab:Ee.bool,renderView:Ee.func,renderInput:Ee.func,renderDay:Ee.func,renderMonth:Ee.func,renderYear:Ee.func}),we(je,"defaultProps",{onOpen:Pe,onClose:Pe,onCalendarOpen:Pe,onCalendarClose:Pe,onChange:Pe,onNavigate:Pe,onBeforeNavigate:function(e){return e},onNavigateBack:Pe,onNavigateForward:Pe,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0}),we(je,"moment",i.a);var Ve=ce(function(e){me(n,e);var t=ve(n);function n(){var e;fe(this,n);for(var r=arguments.length,o=new Array(r),a=0;a1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t,n=this.props.viewDate,r=n.localeData().monthsShort(n.month(e));return(t=r.substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&T(t.prototype,n),r&&T(t,r),a}(c.a.Component);function L(e,t){return t<4?e[0]:t<8?e[1]:e[2]}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&B(t.prototype,n),r&&B(t,r),a}(c.a.Component);function Q(e,t){return t<3?e[0]:t<7?e[1]:e[2]}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(){return(ee=Object.assign||function(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),fe(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),Ie(xe(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),Ie(xe(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),Ie(xe(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),Ie(xe(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),Ie(xe(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),Ie(xe(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),Ie(xe(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&((9===e.which&&r.props.closeOnTab||"Escape"===e.key)&&r._closeCalendar(),r.isOpen()||"ArrowDown"!==e.key||r._openCalendar())})),Ie(xe(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),Ie(xe(r),"_onPickerKeyDown",(function(e){r.props.input&&"Escape"===e.key&&r._closeCalendar()})),Ie(xe(r),"callHandler",u),r.state=r.getInitialState(),r}return Ee(n,[{key:"render",value:function(){return c.a.createElement(We,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker",onKeyDown:this._onPickerKeyDown},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=Pe(Pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(){return this.props.renderView(this.state.currentView,this._renderCalendar)}},{key:"getInitialState",value:function(){var e=this.props,t=this.getFormat("datetime"),n=this.parseDate(e.value||e.initialValue,t);return this.checkTZ(),{open:!e.input,currentView:e.initialViewMode||this.getInitialView(),viewDate:this.getInitialViewDate(n),selectedDate:n&&n.isValid()?n:void 0,inputValue:this.getInitialInputValue(n)}}},{key:"getInitialViewDate",value:function(e){var t,n=this.props.initialViewDate;if(n){if((t=this.parseDate(n,this.getFormat("datetime")))&&t.isValid())return t;Be('The initialViewDated given "'+n+'" is not valid. Using current date instead.')}else if(e&&e.isValid())return e.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(){var e=this.getFormat("date");return e?this.getUpdateOn(e):Le}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ye:-1!==e.indexOf("M")?Me:-1!==e.indexOf("Y")?Re:Ye}},{key:"getLocaleData",value:function(){var e=this.props;return this.localMoment(e.value||e.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(){var e=this.getLocaleData(),t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(){var e=this.getLocaleData(),t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat();if("time"===e)return this.getTimeFormat();var t=this.getDateFormat(),n=this.getTimeFormat();return t&&n?t+" "+n:t||n}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||i.a.tz||(this.tzWarning=!0,Be('displayTimeZone prop with value "'+e+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ()}}},{key:"regenerateDates",value:function(){var e=this.props,t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e){var t=this.props;return t.inputProps.value?t.inputProps.value:e&&e.isValid()?e.format(this.getFormat("datetime")):t.value&&"string"==typeof t.value?t.value:t.initialValue&&"string"==typeof t.initialValue?t.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}}]),n}(c.a.Component);function Be(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}Ie(Ze,"propTypes",{value:Ue,initialValue:Ue,initialViewDate:Ue,initialViewMode:Ae.oneOf([Re,Me,Ye,Le]),onOpen:Ae.func,onClose:Ae.func,onChange:Ae.func,onNavigate:Ae.func,onBeforeNavigate:Ae.func,onNavigateBack:Ae.func,onNavigateForward:Ae.func,updateOnView:Ae.string,locale:Ae.string,utc:Ae.bool,displayTimeZone:Ae.string,input:Ae.bool,dateFormat:Ae.oneOfType([Ae.string,Ae.bool]),timeFormat:Ae.oneOfType([Ae.string,Ae.bool]),inputProps:Ae.object,timeConstraints:Ae.object,isValidDate:Ae.func,open:Ae.bool,strictParsing:Ae.bool,closeOnSelect:Ae.bool,closeOnTab:Ae.bool,renderView:Ae.func,renderInput:Ae.func,renderDay:Ae.func,renderMonth:Ae.func,renderYear:Ae.func}),Ie(Ze,"defaultProps",{onOpen:He,onClose:He,onCalendarOpen:He,onCalendarClose:He,onChange:He,onNavigate:He,onBeforeNavigate:function(e){return e},onNavigateBack:He,onNavigateForward:He,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0,renderView:function(e,t){return t()}}),Ie(Ze,"moment",i.a);var We=De(function(e){Se(n,e);var t=Te(n);function n(){var e;_e(this,n);for(var r=arguments.length,o=new Array(r),a=0;a\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true\n\t}\n\n\trender() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\n\t\tlet startOfMonth = date.clone().startOf('month');\n\t\tlet endOfMonth = date.clone().endOf('month');\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( date, locale ) }\n\t\t\t\t\t\t{ this.renderDayHeaders( locale ) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays( date, startOfMonth, endOfMonth ) }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter( date ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( date, locale ) {\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders( locale ) {\n\t\tlet dayItems = this.getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays( date, startOfMonth, endOfMonth ) {\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = this.getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\tif ( this.props.renderDay ) {\n\t\t\treturn this.props.renderDay(\n\t\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t{ date.date() }\n\t\t);\n\t}\n\n\trenderFooter( date ) {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('time') }\n\t\t\t\t\t\tcolSpan={7}\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n\n\t/**\n\t * Get a list of the days of the week\n\t * depending on the current locale\n\t * @return {array} A list with the shortname of the days\n\t */\n\tgetDaysOfWeek(locale) {\n\t\tconst first = locale.firstDayOfWeek();\n\t\tlet dow = [];\n\t\tlet i = 0;\n\n\t\tlocale._weekdaysMin.forEach(function (day) {\n\t\t\tdow[(7 + (i++) - first) % 7] = day;\n\t\t});\n\n\t\treturn dow;\n\t}\n\n\tgetRow( rows, day ) {\n\t\treturn rows[ Math.floor( day / 7 ) ];\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths( viewYear ) {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = this.getRow( rows, month );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderMonth( month, this.props.selectedDate )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month, selectedDate ) {\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 4 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 8 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tcapitalize( str ) {\n\t\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n\t}\n\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn this.capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class YearsView extends React.Component {\n\trender() {\n\t\tconst viewYear = parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( viewYear ) {\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears( viewYear ) {\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tlet selectedYear = this.props.selectedDate && this.props.selectedDate.year();\n\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = this.getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year, selectedYear )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year, selectedYear ) {\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\n\n\t\tif ( this.props.renderYear ) {\n\t\t\treturn this.props.renderYear(\n\t\t\t\tprops,\n\t\t\t\tyear,\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ year }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 3 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 7 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = this.createConstraints(props);\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\tcreateConstraints( props ) {\n\t\tlet constraints = {};\n\n\t\tObject.keys( timeConstraints ).forEach( type => {\n\t\t\tconstraints[ type ] = { ...timeConstraints[type], ...(props.timeConstraints[type] || {}) };\n\t\t});\n\n\t\treturn constraints;\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\n\t\t\t\t
{ value }
\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('days') }>\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\tpadValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn this.pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn this.pad( type, value );\n\t}\n\n\tpad( type, value ) {\n\t\tlet str = value + '';\n\t\twhile ( str.length < this.padValues[ type ] )\n\t\t\tstr = '0' + str;\n\t\treturn str;\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: this.pad( 'hours', hours ),\n\t\t\tminutes: this.pad( 'minutes', date.minutes() ),\n\t\t\tseconds: this.pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: this.pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './DaysView';\nimport MonthsView from './MonthsView';\nimport YearsView from './YearsView';\nimport TimeView from './TimeView';\nimport onClickOutside from 'react-onclickoutside';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState( props );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView( this.state.currentView, this._renderCalendar ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView( currentView, renderer ) {\n\t\tif ( this.props.renderView ) {\n\t\t\treturn this.props.renderView( currentView, () => renderer(currentView) );\n\t\t}\n\t\treturn renderer( this.state.currentView );\n\t}\n\n\t_renderCalendar = currentView => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState( p ) {\n\t\tlet props = p || this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ( props );\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView( this.getFormat('date') ),\n\t\t\tviewDate: this.getInitialViewDate( props.initialViewDate, selectedDate, inputFormat ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( props, selectedDate, inputFormat )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( propDate, selectedDate, format ) {\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, format );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.log('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView( dateFormat ) {\n\t\tif ( !dateFormat ) return viewModes.TIME;\n\t\treturn this.getUpdateOn( dateFormat );\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData( props ) {\n\t\tlet p = props || this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat( locale ) {\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat( locale ) {\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat( this.getLocaleData() );\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat( this.getLocaleData() );\n\t\t}\n\t\t\n\t\tlet locale = this.getLocaleData();\n\t\tlet dateFormat = this.getDateFormat( locale );\n\t\tlet timeFormat = this.getTimeFormat( locale );\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ( props ) {\n\t\tif ( props.displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tthis.log('displayTimeZone prop with value \"' + props.displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates( this.props );\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ( this.props );\n\t}\n\n\tregenerateDates(props) {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( props, selectedDate, inputFormat ) {\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( inputFormat );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\tlog( message, method ) {\n\t\tlet con = typeof window !== 'undefined' && window.console;\n\t\tif ( !con ) return;\n\n\t\tif ( !method ) {\n\t\t\tmethod = 'warn';\n\t\t}\n\t\tcon[ method ]( '***react-datetime:' + message );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tconsole.log('CLICKING 2!');\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\tcallHandler( method, e ) {\n\t\tif ( !method ) return true;\n\t\treturn method(e) !== false;\n\t}\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Datetime/webpack/bootstrap","webpack://Datetime/external \"react\"","webpack://Datetime/external \"moment\"","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/external \"react-dom\"","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/./src/utils.js","webpack://Datetime/./src/parts/ViewNavigation.js","webpack://Datetime/./src/views/DaysView.js","webpack://Datetime/./src/views/MonthsView.js","webpack://Datetime/./src/views/YearsView.js","webpack://Datetime/./src/views/TimeView.js","webpack://Datetime/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://Datetime/./src/DateTime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","callHandler","method","e","getKeyboardProps","onClickHandler","tabIndex","onKeyDown","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","showView","updateDate","this","renderNavigation","renderDayHeaders","renderDays","renderFooter","date","viewDate","locale","localeData","navigate","months","year","month","dayItems","first","firstDayOfWeek","dow","_weekdaysMin","forEach","day","getDaysOfWeek","map","index","startOfMonth","clone","startOf","endOfMonth","endOf","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","_onFooterClick","React","Component","Math","floor","MonthsView","event","renderMonths","renderMonth","keyboardProps","isDisabledMonth","_updateSelectedMonth","getMonthText","set","str","localMoment","monthStr","monthsShort","substring","charAt","toUpperCase","slice","YearsView","renderYears","viewYear","getViewYear","renderYear","years","selectedYear","getSelectedYear","isDisabledYear","_updateSelectedYear","parseInt","cache","disabledYearsCache","undefined","dayOfYear","timeConstraints","hours","min","max","step","minutes","seconds","milliseconds","TimeView","overrideTimeConstraints","constraints","keys","type","state","getTimeParts","items","timeParts","getCounters","renderCounter","renderHeader","isAMPM","indexOf","increaseCounter","onStartClicking","decreaseCounter","onMouseDown","dateFormat","_onHeaderClick","action","button","toggleDayPart","update","body","document","setState","timer","setTimeout","increaseTimer","setInterval","mouseUpListener","clearTimeout","clearInterval","setTime","removeEventListener","addEventListener","tc","pad","counters","toLowerCase","ampm","prevProps","padValues","length","isNodeFound","current","componentNode","ignoreClass","correspondingElement","classList","contains","seed","passiveEventSupport","uid","handlersMap","enabledInstances","touchEvents","getEventHandlerOptions","instance","eventName","handlerOptions","passive","preventDefault","WrappedComponent","config","_class","_temp","displayName","_Component","subClass","superClass","onClickOutside","_this","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","__getComponentNode","setClickOutsideRef","enableOnClickOutside","_uid","window","options","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","target","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","ref","instanceRef","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","defaultProps","getClass","viewModes","TYPES","nofn","datetype","Date","Datetime","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","currentView","getFormat","_setTime","view","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","inputProps","onFocus","_openCalendar","isValid","which","closeOnTab","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","_onPickerKeyDown","renderView","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","_renderCalendar","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","getInitialInputValue","propDate","initialViewDate","log","getInitialDate","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","defaultValue","getLocaleData","longDateFormat","getDateFormat","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tz","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","me","logError","message","con","console","onCalendarOpen","onCalendarClose","next","_","renderFunc","createRef","container","children"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,E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AOxB,GAAMhQ,KACboJ,WAAY4G,GAAMnP,UAAU,CAACmP,GAAM7P,OAAQ6P,GAAMhQ,OACjDoF,WAAY4K,GAAMnP,UAAU,CAACmP,GAAM7P,OAAQ6P,GAAMhQ,OACjDoS,WAAYpC,GAAMxR,OAClBkJ,gBAAiBsI,GAAMxR,OACvB0G,YAAa8K,GAAM/P,KACnBsR,KAAMvB,GAAMhQ,KACZyV,cAAezF,GAAMhQ,KACrByR,cAAezB,GAAMhQ,KACrByS,WAAYzC,GAAMhQ,KAClBiT,WAAYjD,GAAM/P,KAClB8S,YAAa/C,GAAM/P,KACnB0E,UAAWqL,GAAM/P,KACjB4F,YAAamK,GAAM/P,KACnB8G,WAAYiJ,GAAM/P,O,GA/BCmQ,G,eAkCE,CACrB6B,OAAQhC,GACRiC,QAASjC,GACTqG,eAAgBrG,GAChBsG,gBAAiBtG,GACjB0B,SAAU1B,GACVe,WAAYf,GACZc,iBAAkB,SAASyF,GAAQ,OAAOA,GAC1CzE,eAAgB9B,GAChB6B,kBAAmB7B,GACnB7G,YAAY,EACZhE,YAAY,EACZoQ,KAAK,EACLxT,UAAW,GACXwP,OAAO,EACPY,WAAY,GACZ1K,gBAAiB,GACjBxC,YAAa,WAAa,OAAO,GACjCuQ,eAAe,EACfhE,eAAe,EACfgB,YAAY,EACZN,qBAAqB,EACrBc,WAAY,SAAEwD,EAAGC,GAAL,OAAqBA,O,GAxDdtG,G,SA4DJnL,K,IAmjBX0N,GAAmBjG,G,mMAlBZpH,IAAMqR,a,8CAGjB,OACC,yBAAK3U,UAAYM,KAAKlD,MAAM4C,UAAYyM,IAAMnM,KAAKsU,WAChDtU,KAAKlD,MAAMyX,Y,yCAIGzV,GAClBkB,KAAKlD,MAAMyT,WAAYzR,K,2CAIvB,OAAOkB,KAAKsU,UAAU5L,Y,GAfG1F,IAAMC","file":"react-datetime.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = require(\"react\");","module.exports = require(\"moment\");","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = require(\"react-dom\");","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","export const callHandler = (method, e) => {\n\tif (!method) return true;\n\treturn method(e) !== false;\n};\n\nexport const getKeyboardProps = (onClickHandler) => ({\n\ttabIndex: 0,\n\tonKeyDown: (e) => e.key !== 'Enter' || callHandler(onClickHandler, e),\n});\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true,\n\t\trenderDay: ( props, date ) => { date.date() },\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\t{ this.renderDayHeaders() }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays() }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders() {\n\t\tconst locale = this.props.viewDate.localeData();\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays() {\n\t\tconst date = this.props.viewDate;\n\t\tconst startOfMonth = date.clone().startOf('month');\n\t\tconst endOfMonth = date.clone().endOf('month');\n\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t\tdayProps = { ...getKeyboardProps(dayProps.onClick), ...dayProps };\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\treturn this.props.renderDay(\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t);\n\t}\n\n\trenderFooter() {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\tconst date = this.props.viewDate;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onFooterClick = () => {\n\t\tthis.props.showView('time');\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n}\n\nfunction getRow( rows, day ) {\n\treturn rows[ Math.floor( day / 7 ) ];\n}\n\n/**\n * Get a list of the days of the week\n * depending on the current locale\n * @return {array} A list with the shortname of the days\n */\nfunction getDaysOfWeek( locale ) {\n\tconst first = locale.firstDayOfWeek();\n\tlet dow = [];\n\tlet i = 0;\n\n\tlocale._weekdaysMin.forEach(function (day) {\n\t\tdow[(7 + (i++) - first) % 7] = day;\n\t});\n\n\treturn dow;\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths() {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = getRow( rows, month );\n\n\t\t\trow.push( this.renderMonth( month ) );\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month ) {\n\t\tconst selectedDate = this.props.selectedDate;\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: month,\n\t\t\tclassName,\n\t\t\t'data-value': month,\n\t\t\tonClick\n\t\t};\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\t\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 4 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 8 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n\nfunction capitalize( str ) {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class YearsView extends React.Component {\n\tstatic defaultProps = {\n\t\trenderYear: ( props, year ) => { year },\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst viewYear = this.getViewYear();\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears() {\n\t\tconst viewYear = this.getViewYear();\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year ) {\n\t\tconst selectedYear = this.getSelectedYear();\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: year,\n\t\t\tclassName,\n\t\t\t'data-value': year,\n\t\t\tonClick\n\t\t};\n\n\t\treturn this.props.renderYear(\n\t\t\tprops,\n\t\t\tyear,\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t);\n\t}\n\n\tgetViewYear() {\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\t}\n\n\tgetSelectedYear() {\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 3 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 7 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nfunction createConstraints( overrideTimeConstraints ) {\n\tlet constraints = {};\n\n\tObject.keys( timeConstraints ).forEach( type => {\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\n\t});\n\n\treturn constraints;\n}\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = createConstraints( props.timeConstraints );\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\tconst increaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'increase', type);\n\t\t};\n\n\t\tconst decreaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'decrease', type);\n\t\t};\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
{ value }
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onHeaderClick = () => {\n\t\tthis.props.showView('days');\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\t\t\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\t// keydown event auto repeats\n\t\tif (e.type === 'keydown') return;\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn pad( type, value );\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: pad( 'hours', hours ),\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n\nfunction pad( type, value ) {\n\tconst padValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t};\n\n\tlet str = value + '';\n\twhile ( str.length < padValues[ type ] )\n\t\tstr = '0' + str;\n\treturn str;\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './views/DaysView';\nimport MonthsView from './views/MonthsView';\nimport YearsView from './views/YearsView';\nimport TimeView from './views/TimeView';\nimport onClickOutside from 'react-onclickoutside';\nimport { callHandler } from './utils';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true,\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView() {\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\n\t}\n\n\t_renderCalendar = () => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( state.currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState() {\n\t\tlet props = this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ();\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( selectedDate ) {\n\t\tconst propDate = this.props.initialViewDate;\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView() {\n\t\tconst dateFormat = this.getFormat( 'date' );\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData() {\n\t\tlet p = this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat();\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat();\n\t\t}\n\t\t\n\t\tlet dateFormat = this.getDateFormat();\n\t\tlet timeFormat = this.getTimeFormat();\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ() {\n\t\tconst { displayTimeZone } = this.props;\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates();\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ();\n\t}\n\n\tregenerateDates() {\n\t\tconst props = this.props;\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( selectedDate ) {\n\t\tconst props = this.props;\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( (e.which === 9 && this.props.closeOnTab) || e.key === 'Escape' ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\n\t\tif ( !this.isOpen() && e.key === 'ArrowDown' ) {\n\t\t\tthis._openCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onPickerKeyDown = (e) => {\n\t\tif (this.props.input && e.key === 'Escape') {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tcallHandler = callHandler\n}\n\nfunction log( message, method ) {\n\tlet con = typeof window !== 'undefined' && window.console;\n\tif ( !con ) return;\n\n\tif ( !method ) {\n\t\tmethod = 'warn';\n\t}\n\tcon[ method ]( '***react-datetime:' + message );\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-datetime.umd.js b/dist/react-datetime.umd.js index 53422efc6..7f8ac8f70 100644 --- a/dist/react-datetime.umd.js +++ b/dist/react-datetime.umd.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("moment"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","moment","react-dom"],t):"object"==typeof exports?exports.Datetime=t(require("react"),require("moment"),require("react-dom")):e.Datetime=t(e.react,e.moment,e["react-dom"])}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=n},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";var r=n(6);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(1),i=n.n(a),s=n(0),c=n.n(s);function u(){return(u=Object.assign||function(e){for(var t=1;t1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t=this.props.viewDate,n=t.localeData().monthsShort(t.month(e));return this.capitalize(n.substring(0,3))}}])&&k(t.prototype,n),r&&k(t,r),a}(c.a.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&x(t.prototype,n),r&&x(t,r),a}(c.a.Component);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),this.pad(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),we(ge(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),we(ge(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),we(ge(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),we(ge(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),we(ge(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),we(ge(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),we(ge(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),we(ge(r),"_onInputClick",(function(e){console.log("CLICKING 2!"),r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(e),r}return he(n,[{key:"render",value:function(){return c.a.createElement(Ve,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker"},this.renderView(this.state.currentView,this._renderCalendar)))}},{key:"renderInput",value:function(){if(this.props.input){var e=pe(pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(e,t){return this.props.renderView?this.props.renderView(e,(function(){return t(e)})):t(this.state.currentView)}},{key:"getInitialState",value:function(e){var t=e||this.props,n=this.getFormat("datetime"),r=this.parseDate(t.value||t.initialValue,n);return this.checkTZ(t),{open:!t.input,currentView:t.initialViewMode||this.getInitialView(this.getFormat("date")),viewDate:this.getInitialViewDate(t.initialViewDate,r,n),selectedDate:r&&r.isValid()?r:void 0,inputValue:this.getInitialInputValue(t,r,n)}}},{key:"getInitialViewDate",value:function(e,t,n){var r;if(e){if((r=this.parseDate(e,n))&&r.isValid())return r;this.log('The initialViewDated given "'+e+'" is not valid. Using current date instead.')}else if(t&&t.isValid())return t.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(e){return e?this.getUpdateOn(e):_e}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ce:-1!==e.indexOf("M")?ke:-1!==e.indexOf("Y")?De:Ce}},{key:"getLocaleData",value:function(e){var t=e||this.props;return this.localMoment(t.value||t.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(e){var t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(e){var t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat(this.getLocaleData());if("time"===e)return this.getTimeFormat(this.getLocaleData());var t=this.getLocaleData(),n=this.getDateFormat(t),r=this.getTimeFormat(t);return n&&r?n+" "+r:n||r}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(e){!e.displayTimeZone||this.tzWarning||i.a.tz||(this.tzWarning=!0,this.log('displayTimeZone prop with value "'+e.displayTimeZone+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(this.props),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ(this.props)}}},{key:"regenerateDates",value:function(e){var t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e,t,n){return e.inputProps.value?e.inputProps.value:t&&t.isValid()?t.format(n):e.value&&"string"==typeof e.value?e.value:e.initialValue&&"string"==typeof e.initialValue?e.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}},{key:"log",value:function(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c.a.Component);we(je,"propTypes",{value:Se,initialValue:Se,initialViewDate:Se,initialViewMode:Ee.oneOf([De,ke,Ce,_e]),onOpen:Ee.func,onClose:Ee.func,onChange:Ee.func,onNavigate:Ee.func,onBeforeNavigate:Ee.func,onNavigateBack:Ee.func,onNavigateForward:Ee.func,updateOnView:Ee.string,locale:Ee.string,utc:Ee.bool,displayTimeZone:Ee.string,input:Ee.bool,dateFormat:Ee.oneOfType([Ee.string,Ee.bool]),timeFormat:Ee.oneOfType([Ee.string,Ee.bool]),inputProps:Ee.object,timeConstraints:Ee.object,isValidDate:Ee.func,open:Ee.bool,strictParsing:Ee.bool,closeOnSelect:Ee.bool,closeOnTab:Ee.bool,renderView:Ee.func,renderInput:Ee.func,renderDay:Ee.func,renderMonth:Ee.func,renderYear:Ee.func}),we(je,"defaultProps",{onOpen:Pe,onClose:Pe,onCalendarOpen:Pe,onCalendarClose:Pe,onChange:Pe,onNavigate:Pe,onBeforeNavigate:function(e){return e},onNavigateBack:Pe,onNavigateForward:Pe,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0}),we(je,"moment",i.a);var Ve=ce(function(e){me(n,e);var t=ve(n);function n(){var e;fe(this,n);for(var r=arguments.length,o=new Array(r),a=0;a1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t,n=this.props.viewDate,r=n.localeData().monthsShort(n.month(e));return(t=r.substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&T(t.prototype,n),r&&T(t,r),a}(s.a.Component);function L(e,t){return t<4?e[0]:t<8?e[1]:e[2]}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&B(t.prototype,n),r&&B(t,r),a}(s.a.Component);function Q(e,t){return t<3?e[0]:t<7?e[1]:e[2]}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(){return(ee=Object.assign||function(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),fe(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(c.createElement)(e,n)},i}(c.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),Ie(xe(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),Ie(xe(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),Ie(xe(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),Ie(xe(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),Ie(xe(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),Ie(xe(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),Ie(xe(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&((9===e.which&&r.props.closeOnTab||"Escape"===e.key)&&r._closeCalendar(),r.isOpen()||"ArrowDown"!==e.key||r._openCalendar())})),Ie(xe(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),Ie(xe(r),"_onPickerKeyDown",(function(e){r.props.input&&"Escape"===e.key&&r._closeCalendar()})),Ie(xe(r),"callHandler",u),r.state=r.getInitialState(),r}return Ee(n,[{key:"render",value:function(){return s.a.createElement(We,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),s.a.createElement("div",{className:"rdtPicker",onKeyDown:this._onPickerKeyDown},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=Pe(Pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?s.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):s.a.createElement("input",e)}}},{key:"renderView",value:function(){return this.props.renderView(this.state.currentView,this._renderCalendar)}},{key:"getInitialState",value:function(){var e=this.props,t=this.getFormat("datetime"),n=this.parseDate(e.value||e.initialValue,t);return this.checkTZ(),{open:!e.input,currentView:e.initialViewMode||this.getInitialView(),viewDate:this.getInitialViewDate(n),selectedDate:n&&n.isValid()?n:void 0,inputValue:this.getInitialInputValue(n)}}},{key:"getInitialViewDate",value:function(e){var t,n=this.props.initialViewDate;if(n){if((t=this.parseDate(n,this.getFormat("datetime")))&&t.isValid())return t;Be('The initialViewDated given "'+n+'" is not valid. Using current date instead.')}else if(e&&e.isValid())return e.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(){var e=this.getFormat("date");return e?this.getUpdateOn(e):Le}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ye:-1!==e.indexOf("M")?Me:-1!==e.indexOf("Y")?Re:Ye}},{key:"getLocaleData",value:function(){var e=this.props;return this.localMoment(e.value||e.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(){var e=this.getLocaleData(),t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(){var e=this.getLocaleData(),t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat();if("time"===e)return this.getTimeFormat();var t=this.getDateFormat(),n=this.getTimeFormat();return t&&n?t+" "+n:t||n}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||i.a.tz||(this.tzWarning=!0,Be('displayTimeZone prop with value "'+e+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ()}}},{key:"regenerateDates",value:function(){var e=this.props,t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e){var t=this.props;return t.inputProps.value?t.inputProps.value:e&&e.isValid()?e.format(this.getFormat("datetime")):t.value&&"string"==typeof t.value?t.value:t.initialValue&&"string"==typeof t.initialValue?t.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}}]),n}(s.a.Component);function Be(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}Ie(Ze,"propTypes",{value:Ue,initialValue:Ue,initialViewDate:Ue,initialViewMode:Ae.oneOf([Re,Me,Ye,Le]),onOpen:Ae.func,onClose:Ae.func,onChange:Ae.func,onNavigate:Ae.func,onBeforeNavigate:Ae.func,onNavigateBack:Ae.func,onNavigateForward:Ae.func,updateOnView:Ae.string,locale:Ae.string,utc:Ae.bool,displayTimeZone:Ae.string,input:Ae.bool,dateFormat:Ae.oneOfType([Ae.string,Ae.bool]),timeFormat:Ae.oneOfType([Ae.string,Ae.bool]),inputProps:Ae.object,timeConstraints:Ae.object,isValidDate:Ae.func,open:Ae.bool,strictParsing:Ae.bool,closeOnSelect:Ae.bool,closeOnTab:Ae.bool,renderView:Ae.func,renderInput:Ae.func,renderDay:Ae.func,renderMonth:Ae.func,renderYear:Ae.func}),Ie(Ze,"defaultProps",{onOpen:He,onClose:He,onCalendarOpen:He,onCalendarClose:He,onChange:He,onNavigate:He,onBeforeNavigate:function(e){return e},onNavigateBack:He,onNavigateForward:He,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0,renderView:function(e,t){return t()}}),Ie(Ze,"moment",i.a);var We=De(function(e){Se(n,e);var t=Te(n);function n(){var e;_e(this,n);for(var r=arguments.length,o=new Array(r),a=0;a\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true\n\t}\n\n\trender() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\n\t\tlet startOfMonth = date.clone().startOf('month');\n\t\tlet endOfMonth = date.clone().endOf('month');\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( date, locale ) }\n\t\t\t\t\t\t{ this.renderDayHeaders( locale ) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays( date, startOfMonth, endOfMonth ) }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter( date ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( date, locale ) {\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders( locale ) {\n\t\tlet dayItems = this.getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays( date, startOfMonth, endOfMonth ) {\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = this.getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\tif ( this.props.renderDay ) {\n\t\t\treturn this.props.renderDay(\n\t\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t{ date.date() }\n\t\t);\n\t}\n\n\trenderFooter( date ) {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('time') }\n\t\t\t\t\t\tcolSpan={7}\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n\n\t/**\n\t * Get a list of the days of the week\n\t * depending on the current locale\n\t * @return {array} A list with the shortname of the days\n\t */\n\tgetDaysOfWeek(locale) {\n\t\tconst first = locale.firstDayOfWeek();\n\t\tlet dow = [];\n\t\tlet i = 0;\n\n\t\tlocale._weekdaysMin.forEach(function (day) {\n\t\t\tdow[(7 + (i++) - first) % 7] = day;\n\t\t});\n\n\t\treturn dow;\n\t}\n\n\tgetRow( rows, day ) {\n\t\treturn rows[ Math.floor( day / 7 ) ];\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths( viewYear ) {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = this.getRow( rows, month );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderMonth( month, this.props.selectedDate )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month, selectedDate ) {\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 4 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 8 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tcapitalize( str ) {\n\t\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n\t}\n\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn this.capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class YearsView extends React.Component {\n\trender() {\n\t\tconst viewYear = parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( viewYear ) {\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears( viewYear ) {\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tlet selectedYear = this.props.selectedDate && this.props.selectedDate.year();\n\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = this.getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year, selectedYear )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year, selectedYear ) {\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\n\n\t\tif ( this.props.renderYear ) {\n\t\t\treturn this.props.renderYear(\n\t\t\t\tprops,\n\t\t\t\tyear,\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ year }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 3 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 7 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = this.createConstraints(props);\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\tcreateConstraints( props ) {\n\t\tlet constraints = {};\n\n\t\tObject.keys( timeConstraints ).forEach( type => {\n\t\t\tconstraints[ type ] = { ...timeConstraints[type], ...(props.timeConstraints[type] || {}) };\n\t\t});\n\n\t\treturn constraints;\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\n\t\t\t\t
{ value }
\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('days') }>\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\tpadValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn this.pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn this.pad( type, value );\n\t}\n\n\tpad( type, value ) {\n\t\tlet str = value + '';\n\t\twhile ( str.length < this.padValues[ type ] )\n\t\t\tstr = '0' + str;\n\t\treturn str;\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: this.pad( 'hours', hours ),\n\t\t\tminutes: this.pad( 'minutes', date.minutes() ),\n\t\t\tseconds: this.pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: this.pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './DaysView';\nimport MonthsView from './MonthsView';\nimport YearsView from './YearsView';\nimport TimeView from './TimeView';\nimport onClickOutside from 'react-onclickoutside';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState( props );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView( this.state.currentView, this._renderCalendar ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView( currentView, renderer ) {\n\t\tif ( this.props.renderView ) {\n\t\t\treturn this.props.renderView( currentView, () => renderer(currentView) );\n\t\t}\n\t\treturn renderer( this.state.currentView );\n\t}\n\n\t_renderCalendar = currentView => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState( p ) {\n\t\tlet props = p || this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ( props );\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView( this.getFormat('date') ),\n\t\t\tviewDate: this.getInitialViewDate( props.initialViewDate, selectedDate, inputFormat ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( props, selectedDate, inputFormat )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( propDate, selectedDate, format ) {\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, format );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.log('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView( dateFormat ) {\n\t\tif ( !dateFormat ) return viewModes.TIME;\n\t\treturn this.getUpdateOn( dateFormat );\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData( props ) {\n\t\tlet p = props || this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat( locale ) {\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat( locale ) {\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat( this.getLocaleData() );\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat( this.getLocaleData() );\n\t\t}\n\t\t\n\t\tlet locale = this.getLocaleData();\n\t\tlet dateFormat = this.getDateFormat( locale );\n\t\tlet timeFormat = this.getTimeFormat( locale );\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ( props ) {\n\t\tif ( props.displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tthis.log('displayTimeZone prop with value \"' + props.displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates( this.props );\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ( this.props );\n\t}\n\n\tregenerateDates(props) {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( props, selectedDate, inputFormat ) {\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( inputFormat );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\tlog( message, method ) {\n\t\tlet con = typeof window !== 'undefined' && window.console;\n\t\tif ( !con ) return;\n\n\t\tif ( !method ) {\n\t\t\tmethod = 'warn';\n\t\t}\n\t\tcon[ method ]( '***react-datetime:' + message );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tconsole.log('CLICKING 2!');\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\tcallHandler( method, e ) {\n\t\tif ( !method ) return true;\n\t\treturn method(e) !== false;\n\t}\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Datetime/webpack/universalModuleDefinition","webpack://Datetime/webpack/bootstrap","webpack://Datetime/external \"react\"","webpack://Datetime/external \"moment\"","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/external \"react-dom\"","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/./src/utils.js","webpack://Datetime/./src/parts/ViewNavigation.js","webpack://Datetime/./src/views/DaysView.js","webpack://Datetime/./src/views/MonthsView.js","webpack://Datetime/./src/views/YearsView.js","webpack://Datetime/./src/views/TimeView.js","webpack://Datetime/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://Datetime/./src/DateTime.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__3__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","callHandler","method","e","getKeyboardProps","onClickHandler","tabIndex","onKeyDown","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","showView","updateDate","this","renderNavigation","renderDayHeaders","renderDays","renderFooter","date","viewDate","locale","localeData","navigate","months","year","month","dayItems","first","firstDayOfWeek","dow","_weekdaysMin","forEach","day","getDaysOfWeek","map","index","startOfMonth","clone","startOf","endOfMonth","endOf","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","_onFooterClick","React","Component","Math","floor","MonthsView","event","renderMonths","renderMonth","keyboardProps","isDisabledMonth","_updateSelectedMonth","getMonthText","set","str","localMoment","monthStr","monthsShort","substring","charAt","toUpperCase","slice","YearsView","renderYears","viewYear","getViewYear","renderYear","years","selectedYear","getSelectedYear","isDisabledYear","_updateSelectedYear","parseInt","cache","disabledYearsCache","undefined","dayOfYear","timeConstraints","hours","min","max","step","minutes","seconds","milliseconds","TimeView","overrideTimeConstraints","constraints","keys","type","state","getTimeParts","items","timeParts","getCounters","renderCounter","renderHeader","isAMPM","indexOf","increaseCounter","onStartClicking","decreaseCounter","onMouseDown","dateFormat","_onHeaderClick","action","button","toggleDayPart","update","body","document","setState","timer","setTimeout","increaseTimer","setInterval","mouseUpListener","clearTimeout","clearInterval","setTime","removeEventListener","addEventListener","tc","pad","counters","toLowerCase","ampm","prevProps","padValues","length","isNodeFound","current","componentNode","ignoreClass","correspondingElement","classList","contains","seed","passiveEventSupport","uid","handlersMap","enabledInstances","touchEvents","getEventHandlerOptions","instance","eventName","handlerOptions","passive","preventDefault","WrappedComponent","config","_class","_temp","displayName","_Component","subClass","superClass","onClickOutside","_this","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","__getComponentNode","setClickOutsideRef","enableOnClickOutside","_uid","options","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","target","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","ref","instanceRef","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","defaultProps","getClass","viewModes","TYPES","nofn","datetype","Date","Datetime","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","currentView","getFormat","_setTime","view","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","inputProps","onFocus","_openCalendar","isValid","which","closeOnTab","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","_onPickerKeyDown","renderView","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","_renderCalendar","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","getInitialInputValue","propDate","initialViewDate","log","getInitialDate","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","defaultValue","getLocaleData","longDateFormat","getDateFormat","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tz","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","me","logError","message","con","console","onCalendarOpen","onCalendarClose","next","_","renderFunc","createRef","container","children"],"mappings":"CAAA,SAA2CA,EAAMC,GAE1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,UAAWA,QAAQ,cAE7C,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,SAAU,aAAcJ,GAEf,iBAAZC,QACdA,QAAkB,SAAID,EAAQG,QAAQ,SAAUA,QAAQ,UAAWA,QAAQ,cAG3EJ,EAAe,SAAIC,EAAQD,EAAY,MAAGA,EAAa,OAAGA,EAAK,cAZjE,CAaGO,QAAQ,SAASC,EAAgCC,EAAgCC,GACpF,O,YCbE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EA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IAAMoR,a,8CAGjB,OACC,yBAAK1U,UAAYM,KAAKlD,MAAM4C,UAAYwM,IAAMlM,KAAKqU,WAChDrU,KAAKlD,MAAMwX,Y,yCAIGxV,GAClBkB,KAAKlD,MAAMwT,WAAYxR,K,2CAIvB,OAAOkB,KAAKqU,UAAU3L,Y,GAfG1F,IAAMC,e","file":"react-datetime.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t//React datetime\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"moment\"), require(\"react-dom\"));\n\t//React datetime\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"moment\", \"react-dom\"], factory);\n\t//React datetime\n\telse if(typeof exports === 'object')\n\t\texports[\"Datetime\"] = factory(require(\"react\"), require(\"moment\"), require(\"react-dom\"));\n\t//React datetime\n\telse\n\t\troot[\"Datetime\"] = factory(root[\"react\"], root[\"moment\"], root[\"react-dom\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","export const callHandler = (method, e) => {\n\tif (!method) return true;\n\treturn method(e) !== false;\n};\n\nexport const getKeyboardProps = (onClickHandler) => ({\n\ttabIndex: 0,\n\tonKeyDown: (e) => e.key !== 'Enter' || callHandler(onClickHandler, e),\n});\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true,\n\t\trenderDay: ( props, date ) => { date.date() },\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\t{ this.renderDayHeaders() }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays() }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders() {\n\t\tconst locale = this.props.viewDate.localeData();\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays() {\n\t\tconst date = this.props.viewDate;\n\t\tconst startOfMonth = date.clone().startOf('month');\n\t\tconst endOfMonth = date.clone().endOf('month');\n\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t\tdayProps = { ...getKeyboardProps(dayProps.onClick), ...dayProps };\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\treturn this.props.renderDay(\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t);\n\t}\n\n\trenderFooter() {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\tconst date = this.props.viewDate;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onFooterClick = () => {\n\t\tthis.props.showView('time');\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n}\n\nfunction getRow( rows, day ) {\n\treturn rows[ Math.floor( day / 7 ) ];\n}\n\n/**\n * Get a list of the days of the week\n * depending on the current locale\n * @return {array} A list with the shortname of the days\n */\nfunction getDaysOfWeek( locale ) {\n\tconst first = locale.firstDayOfWeek();\n\tlet dow = [];\n\tlet i = 0;\n\n\tlocale._weekdaysMin.forEach(function (day) {\n\t\tdow[(7 + (i++) - first) % 7] = day;\n\t});\n\n\treturn dow;\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths() {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = getRow( rows, month );\n\n\t\t\trow.push( this.renderMonth( month ) );\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month ) {\n\t\tconst selectedDate = this.props.selectedDate;\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: month,\n\t\t\tclassName,\n\t\t\t'data-value': month,\n\t\t\tonClick\n\t\t};\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\t\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 4 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 8 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n\nfunction capitalize( str ) {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class YearsView extends React.Component {\n\tstatic defaultProps = {\n\t\trenderYear: ( props, year ) => { year },\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst viewYear = this.getViewYear();\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears() {\n\t\tconst viewYear = this.getViewYear();\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year ) {\n\t\tconst selectedYear = this.getSelectedYear();\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: year,\n\t\t\tclassName,\n\t\t\t'data-value': year,\n\t\t\tonClick\n\t\t};\n\n\t\treturn this.props.renderYear(\n\t\t\tprops,\n\t\t\tyear,\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t);\n\t}\n\n\tgetViewYear() {\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\t}\n\n\tgetSelectedYear() {\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 3 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 7 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nfunction createConstraints( overrideTimeConstraints ) {\n\tlet constraints = {};\n\n\tObject.keys( timeConstraints ).forEach( type => {\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\n\t});\n\n\treturn constraints;\n}\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = createConstraints( props.timeConstraints );\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\tconst increaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'increase', type);\n\t\t};\n\n\t\tconst decreaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'decrease', type);\n\t\t};\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
{ value }
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onHeaderClick = () => {\n\t\tthis.props.showView('days');\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\t\t\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\t// keydown event auto repeats\n\t\tif (e.type === 'keydown') return;\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn pad( type, value );\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: pad( 'hours', hours ),\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n\nfunction pad( type, value ) {\n\tconst padValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t};\n\n\tlet str = value + '';\n\twhile ( str.length < padValues[ type ] )\n\t\tstr = '0' + str;\n\treturn str;\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './views/DaysView';\nimport MonthsView from './views/MonthsView';\nimport YearsView from './views/YearsView';\nimport TimeView from './views/TimeView';\nimport onClickOutside from 'react-onclickoutside';\nimport { callHandler } from './utils';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true,\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView() {\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\n\t}\n\n\t_renderCalendar = () => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( state.currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState() {\n\t\tlet props = this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ();\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( selectedDate ) {\n\t\tconst propDate = this.props.initialViewDate;\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView() {\n\t\tconst dateFormat = this.getFormat( 'date' );\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData() {\n\t\tlet p = this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat();\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat();\n\t\t}\n\t\t\n\t\tlet dateFormat = this.getDateFormat();\n\t\tlet timeFormat = this.getTimeFormat();\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ() {\n\t\tconst { displayTimeZone } = this.props;\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates();\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ();\n\t}\n\n\tregenerateDates() {\n\t\tconst props = this.props;\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( selectedDate ) {\n\t\tconst props = this.props;\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( (e.which === 9 && this.props.closeOnTab) || e.key === 'Escape' ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\n\t\tif ( !this.isOpen() && e.key === 'ArrowDown' ) {\n\t\t\tthis._openCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onPickerKeyDown = (e) => {\n\t\tif (this.props.input && e.key === 'Escape') {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tcallHandler = callHandler\n}\n\nfunction log( message, method ) {\n\tlet con = typeof window !== 'undefined' && window.console;\n\tif ( !con ) return;\n\n\tif ( !method ) {\n\t\tmethod = 'warn';\n\t}\n\tcon[ method ]( '***react-datetime:' + message );\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/DateTime.js b/src/DateTime.js index 88a72bfb0..4a194b9aa 100644 --- a/src/DateTime.js +++ b/src/DateTime.js @@ -6,6 +6,7 @@ import MonthsView from './views/MonthsView'; import YearsView from './views/YearsView'; import TimeView from './views/TimeView'; import onClickOutside from 'react-onclickoutside'; +import { callHandler } from './utils'; const viewModes = { YEARS: 'years', @@ -89,7 +90,7 @@ export default class Datetime extends React.Component { return ( { this.renderInput() } -
+
{ this.renderView() }
@@ -586,9 +587,13 @@ export default class Datetime extends React.Component { _onInputKeyDown = e => { if ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return; - if ( e.which === 9 && this.props.closeOnTab ) { + if ( (e.which === 9 && this.props.closeOnTab) || e.key === 'Escape' ) { this._closeCalendar(); } + + if ( !this.isOpen() && e.key === 'ArrowDown' ) { + this._openCalendar(); + } } _onInputClick = e => { @@ -599,10 +604,13 @@ export default class Datetime extends React.Component { this._openCalendar(); } - callHandler( method, e ) { - if ( !method ) return true; - return method(e) !== false; + _onPickerKeyDown = (e) => { + if (this.props.input && e.key === 'Escape') { + this._closeCalendar(); + } } + + callHandler = callHandler } function log( message, method ) { diff --git a/src/parts/ViewNavigation.js b/src/parts/ViewNavigation.js index a04d63454..27b43d6c4 100644 --- a/src/parts/ViewNavigation.js +++ b/src/parts/ViewNavigation.js @@ -1,15 +1,16 @@ import React from 'react'; +import { getKeyboardProps } from '../utils'; export default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) { return ( - + - + { switchContent } - + diff --git a/src/utils.js b/src/utils.js new file mode 100644 index 000000000..4de0d94d3 --- /dev/null +++ b/src/utils.js @@ -0,0 +1,9 @@ +export const callHandler = (method, e) => { + if (!method) return true; + return method(e) !== false; +}; + +export const getKeyboardProps = (onClickHandler) => ({ + tabIndex: 0, + onKeyDown: (e) => e.key !== 'Enter' || callHandler(onClickHandler, e), +}); diff --git a/src/views/DaysView.js b/src/views/DaysView.js index 90499e126..86e2defe8 100644 --- a/src/views/DaysView.js +++ b/src/views/DaysView.js @@ -1,5 +1,6 @@ import React from 'react'; import ViewNavigation from '../parts/ViewNavigation'; +import { getKeyboardProps } from '../utils'; export default class DaysView extends React.Component { static defaultProps = { @@ -104,6 +105,7 @@ export default class DaysView extends React.Component { if ( this.props.isValidDate(date) ) { dayProps.onClick = this._setDate; + dayProps = { ...getKeyboardProps(dayProps.onClick), ...dayProps }; } else { className += ' rdtDisabled'; @@ -123,7 +125,9 @@ export default class DaysView extends React.Component { return ( - this.props.showView('time') } + { date.format( this.props.timeFormat ) } @@ -133,6 +137,10 @@ export default class DaysView extends React.Component { ); } + _onFooterClick = () => { + this.props.showView('time'); + } + _setDate = e => { this.props.updateDate( e ); } diff --git a/src/views/MonthsView.js b/src/views/MonthsView.js index 4fa629490..e35fb1a2a 100644 --- a/src/views/MonthsView.js +++ b/src/views/MonthsView.js @@ -1,5 +1,6 @@ import React from 'react'; import ViewNavigation from '../parts/ViewNavigation'; +import { getKeyboardProps } from '../utils'; export default class MonthsView extends React.Component { render() { @@ -52,19 +53,27 @@ export default class MonthsView extends React.Component { const selectedDate = this.props.selectedDate; let className = 'rdtMonth'; let onClick; + let keyboardProps = {}; if ( this.isDisabledMonth( month ) ) { className += ' rdtDisabled'; } else { onClick = this._updateSelectedMonth; + keyboardProps = getKeyboardProps(onClick); } if ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) { className += ' rdtActive'; } - let props = {key: month, className, 'data-value': month, onClick }; + let props = { + ...keyboardProps, + key: month, + className, + 'data-value': month, + onClick + }; if ( this.props.renderMonth ) { return this.props.renderMonth( diff --git a/src/views/TimeView.js b/src/views/TimeView.js index 210cdce22..985bc22c0 100644 --- a/src/views/TimeView.js +++ b/src/views/TimeView.js @@ -1,4 +1,5 @@ import React from 'react'; +import { getKeyboardProps } from '../utils'; const timeConstraints = { hours: { @@ -95,11 +96,19 @@ export default class TimeView extends React.Component { } } + const increaseCounter = (e) => { + this.onStartClicking(e, 'increase', type); + }; + + const decreaseCounter = (e) => { + this.onStartClicking(e, 'decrease', type); + }; + return (
- this.onStartClicking( e, 'increase', type)}>▲ +
{ value }
- this.onStartClicking( e, 'decrease', type)}>▼ +
); } @@ -112,7 +121,12 @@ export default class TimeView extends React.Component { return ( - this.props.showView('days') }> + { date.format( this.props.dateFormat ) } @@ -120,6 +134,10 @@ export default class TimeView extends React.Component { ); } + _onHeaderClick = () => { + this.props.showView('days'); + } + onStartClicking( e, action, type ) { if ( e && e.button && e.button !== 0 ) { // Only left clicks, thanks @@ -127,12 +145,15 @@ export default class TimeView extends React.Component { } if ( type === 'ampm' ) return this.toggleDayPart(); - + let update = {}; let body = document.body; update[ type ] = this[ action ]( type ); this.setState( update ); + // keydown event auto repeats + if (e.type === 'keydown') return; + this.timer = setTimeout( () => { this.increaseTimer = setInterval( () => { update[ type ] = this[ action ]( type ); diff --git a/src/views/YearsView.js b/src/views/YearsView.js index 933d7c4dd..7834b158b 100644 --- a/src/views/YearsView.js +++ b/src/views/YearsView.js @@ -1,5 +1,6 @@ import React from 'react'; import ViewNavigation from '../parts/ViewNavigation'; +import { getKeyboardProps } from '../utils'; export default class YearsView extends React.Component { static defaultProps = { @@ -56,19 +57,27 @@ export default class YearsView extends React.Component { const selectedYear = this.getSelectedYear(); let className = 'rdtYear'; let onClick; + let keyboardProps = {}; if ( this.isDisabledYear( year ) ) { className += ' rdtDisabled'; } else { onClick = this._updateSelectedYear; + keyboardProps = getKeyboardProps(onClick); } if ( selectedYear === year ) { className += ' rdtActive'; } - let props = {key: year, className, 'data-value': year, onClick }; + let props = { + ...keyboardProps, + key: year, + className, + 'data-value': year, + onClick + }; return this.props.renderYear( props, diff --git a/test/__snapshots__/snapshots.spec.js.snap b/test/__snapshots__/snapshots.spec.js.snap index 7dcf4ee1b..717a95d9b 100644 --- a/test/__snapshots__/snapshots.spec.js.snap +++ b/test/__snapshots__/snapshots.spec.js.snap @@ -15,6 +15,7 @@ exports[`className: set to arbitraty value 1`] = ` />
‹ @@ -35,12 +38,16 @@ exports[`className: set to arbitraty value 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -93,6 +100,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -102,6 +111,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -111,6 +122,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -120,6 +133,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -129,6 +144,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -138,6 +155,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -147,6 +166,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -158,6 +179,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -167,6 +190,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -176,6 +201,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -185,6 +212,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -194,6 +223,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -203,6 +234,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -212,6 +245,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -223,6 +258,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -232,6 +269,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -241,6 +280,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -250,6 +291,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -259,6 +302,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -268,6 +313,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -277,6 +324,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -288,6 +337,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -297,6 +348,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -306,6 +359,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -315,6 +370,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -324,6 +381,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -333,6 +392,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -342,6 +403,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -353,6 +416,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -362,6 +427,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -371,6 +438,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -380,6 +449,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -389,6 +460,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -398,6 +471,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -407,6 +482,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -418,6 +495,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -427,6 +506,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -436,6 +517,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -445,6 +528,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -454,6 +539,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -463,6 +550,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -472,6 +561,8 @@ exports[`className: set to arbitraty value 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -483,6 +574,8 @@ exports[`className: set to arbitraty value 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -509,6 +602,7 @@ exports[`dateFormat set to false 1`] = ` />
@@ -536,7 +632,9 @@ exports[`dateFormat set to false 1`] = `
@@ -551,7 +649,9 @@ exports[`dateFormat set to false 1`] = ` > @@ -562,7 +662,9 @@ exports[`dateFormat set to false 1`] = `
@@ -572,7 +674,9 @@ exports[`dateFormat set to false 1`] = ` > @@ -583,7 +687,9 @@ exports[`dateFormat set to false 1`] = `
@@ -613,6 +719,7 @@ exports[`dateFormat set to true 1`] = ` />
‹ @@ -633,12 +742,16 @@ exports[`dateFormat set to true 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -691,6 +804,8 @@ exports[`dateFormat set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -700,6 +815,8 @@ exports[`dateFormat set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -709,6 +826,8 @@ exports[`dateFormat set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -718,6 +837,8 @@ exports[`dateFormat set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -727,6 +848,8 @@ exports[`dateFormat set to true 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -736,6 +859,8 @@ exports[`dateFormat set to true 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -745,6 +870,8 @@ exports[`dateFormat set to true 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -756,6 +883,8 @@ exports[`dateFormat set to true 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -765,6 +894,8 @@ exports[`dateFormat set to true 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -774,6 +905,8 @@ exports[`dateFormat set to true 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -783,6 +916,8 @@ exports[`dateFormat set to true 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -792,6 +927,8 @@ exports[`dateFormat set to true 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -801,6 +938,8 @@ exports[`dateFormat set to true 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -810,6 +949,8 @@ exports[`dateFormat set to true 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -821,6 +962,8 @@ exports[`dateFormat set to true 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -830,6 +973,8 @@ exports[`dateFormat set to true 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -839,6 +984,8 @@ exports[`dateFormat set to true 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -848,6 +995,8 @@ exports[`dateFormat set to true 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -857,6 +1006,8 @@ exports[`dateFormat set to true 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -866,6 +1017,8 @@ exports[`dateFormat set to true 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -875,6 +1028,8 @@ exports[`dateFormat set to true 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -886,6 +1041,8 @@ exports[`dateFormat set to true 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -895,6 +1052,8 @@ exports[`dateFormat set to true 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -904,6 +1063,8 @@ exports[`dateFormat set to true 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -913,6 +1074,8 @@ exports[`dateFormat set to true 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -922,6 +1085,8 @@ exports[`dateFormat set to true 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -931,6 +1096,8 @@ exports[`dateFormat set to true 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -940,6 +1107,8 @@ exports[`dateFormat set to true 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -951,6 +1120,8 @@ exports[`dateFormat set to true 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -960,6 +1131,8 @@ exports[`dateFormat set to true 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -969,6 +1142,8 @@ exports[`dateFormat set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -978,6 +1153,8 @@ exports[`dateFormat set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -987,6 +1164,8 @@ exports[`dateFormat set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -996,6 +1175,8 @@ exports[`dateFormat set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -1005,6 +1186,8 @@ exports[`dateFormat set to true 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -1016,6 +1199,8 @@ exports[`dateFormat set to true 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -1025,6 +1210,8 @@ exports[`dateFormat set to true 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -1034,6 +1221,8 @@ exports[`dateFormat set to true 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -1043,6 +1232,8 @@ exports[`dateFormat set to true 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -1052,6 +1243,8 @@ exports[`dateFormat set to true 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -1061,6 +1254,8 @@ exports[`dateFormat set to true 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -1070,6 +1265,8 @@ exports[`dateFormat set to true 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -1081,6 +1278,8 @@ exports[`dateFormat set to true 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -1107,6 +1306,7 @@ exports[`defaultValue: set to arbitrary value 1`] = ` />
‹ @@ -1127,12 +1329,16 @@ exports[`defaultValue: set to arbitrary value 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -1185,6 +1391,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -1194,6 +1402,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -1203,6 +1413,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -1212,6 +1424,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -1221,6 +1435,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -1230,6 +1446,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -1239,6 +1457,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -1250,6 +1470,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -1259,6 +1481,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -1268,6 +1492,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -1277,6 +1503,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -1286,6 +1514,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -1295,6 +1525,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -1304,6 +1536,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -1315,6 +1549,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -1324,6 +1560,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -1333,6 +1571,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -1342,6 +1582,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -1351,6 +1593,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -1360,6 +1604,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -1369,6 +1615,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -1380,6 +1628,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -1389,6 +1639,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -1398,6 +1650,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -1407,6 +1661,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -1416,6 +1672,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -1425,6 +1683,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -1434,6 +1694,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -1445,6 +1707,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -1454,6 +1718,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -1463,6 +1729,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -1472,6 +1740,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -1481,6 +1751,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -1490,6 +1762,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -1499,6 +1773,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -1510,6 +1786,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -1519,6 +1797,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -1528,6 +1808,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -1537,6 +1819,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -1546,6 +1830,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -1555,6 +1841,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -1564,6 +1852,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -1575,6 +1865,8 @@ exports[`defaultValue: set to arbitrary value 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -1601,6 +1893,7 @@ exports[`everything default: renders correctly 1`] = ` />
‹ @@ -1621,12 +1916,16 @@ exports[`everything default: renders correctly 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -1679,6 +1978,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -1688,6 +1989,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -1697,6 +2000,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -1706,6 +2011,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -1715,6 +2022,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -1724,6 +2033,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -1733,6 +2044,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -1744,6 +2057,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -1753,6 +2068,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -1762,6 +2079,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -1771,6 +2090,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -1780,6 +2101,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -1789,6 +2112,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -1798,6 +2123,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -1809,6 +2136,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -1818,6 +2147,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -1827,6 +2158,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -1836,6 +2169,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -1845,6 +2180,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -1854,6 +2191,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -1863,6 +2202,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -1874,6 +2215,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -1883,6 +2226,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -1892,6 +2237,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -1901,6 +2248,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -1910,6 +2259,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -1919,6 +2270,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -1928,6 +2281,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -1939,6 +2294,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -1948,6 +2305,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -1957,6 +2316,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -1966,6 +2327,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -1975,6 +2338,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -1984,6 +2349,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -1993,6 +2360,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -2004,6 +2373,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -2013,6 +2384,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -2022,6 +2395,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -2031,6 +2406,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -2040,6 +2417,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -2049,6 +2428,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -2058,6 +2439,8 @@ exports[`everything default: renders correctly 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -2069,6 +2452,8 @@ exports[`everything default: renders correctly 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -2086,6 +2471,7 @@ exports[`input input: set to false 1`] = ` >
‹ @@ -2106,12 +2494,16 @@ exports[`input input: set to false 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -2164,6 +2556,8 @@ exports[`input input: set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -2173,6 +2567,8 @@ exports[`input input: set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -2182,6 +2578,8 @@ exports[`input input: set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -2191,6 +2589,8 @@ exports[`input input: set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -2200,6 +2600,8 @@ exports[`input input: set to false 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -2209,6 +2611,8 @@ exports[`input input: set to false 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -2218,6 +2622,8 @@ exports[`input input: set to false 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -2229,6 +2635,8 @@ exports[`input input: set to false 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -2238,6 +2646,8 @@ exports[`input input: set to false 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -2247,6 +2657,8 @@ exports[`input input: set to false 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -2256,6 +2668,8 @@ exports[`input input: set to false 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -2265,6 +2679,8 @@ exports[`input input: set to false 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -2274,6 +2690,8 @@ exports[`input input: set to false 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -2283,6 +2701,8 @@ exports[`input input: set to false 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -2294,6 +2714,8 @@ exports[`input input: set to false 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -2303,6 +2725,8 @@ exports[`input input: set to false 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -2312,6 +2736,8 @@ exports[`input input: set to false 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -2321,6 +2747,8 @@ exports[`input input: set to false 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -2330,6 +2758,8 @@ exports[`input input: set to false 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -2339,6 +2769,8 @@ exports[`input input: set to false 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -2348,6 +2780,8 @@ exports[`input input: set to false 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -2359,6 +2793,8 @@ exports[`input input: set to false 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -2368,6 +2804,8 @@ exports[`input input: set to false 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -2377,6 +2815,8 @@ exports[`input input: set to false 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -2386,6 +2826,8 @@ exports[`input input: set to false 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -2395,6 +2837,8 @@ exports[`input input: set to false 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -2404,6 +2848,8 @@ exports[`input input: set to false 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -2413,6 +2859,8 @@ exports[`input input: set to false 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -2424,6 +2872,8 @@ exports[`input input: set to false 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -2433,6 +2883,8 @@ exports[`input input: set to false 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -2442,6 +2894,8 @@ exports[`input input: set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -2451,6 +2905,8 @@ exports[`input input: set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -2460,6 +2916,8 @@ exports[`input input: set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -2469,6 +2927,8 @@ exports[`input input: set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -2478,6 +2938,8 @@ exports[`input input: set to false 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -2489,6 +2951,8 @@ exports[`input input: set to false 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -2498,6 +2962,8 @@ exports[`input input: set to false 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -2507,6 +2973,8 @@ exports[`input input: set to false 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -2516,6 +2984,8 @@ exports[`input input: set to false 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -2525,6 +2995,8 @@ exports[`input input: set to false 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -2534,6 +3006,8 @@ exports[`input input: set to false 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -2543,6 +3017,8 @@ exports[`input input: set to false 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -2554,6 +3030,8 @@ exports[`input input: set to false 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -2580,6 +3058,7 @@ exports[`input input: set to true 1`] = ` />
‹ @@ -2600,12 +3081,16 @@ exports[`input input: set to true 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -2658,6 +3143,8 @@ exports[`input input: set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -2667,6 +3154,8 @@ exports[`input input: set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -2676,6 +3165,8 @@ exports[`input input: set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -2685,6 +3176,8 @@ exports[`input input: set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -2694,6 +3187,8 @@ exports[`input input: set to true 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -2703,6 +3198,8 @@ exports[`input input: set to true 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -2712,6 +3209,8 @@ exports[`input input: set to true 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -2723,6 +3222,8 @@ exports[`input input: set to true 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -2732,6 +3233,8 @@ exports[`input input: set to true 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -2741,6 +3244,8 @@ exports[`input input: set to true 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -2750,6 +3255,8 @@ exports[`input input: set to true 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -2759,6 +3266,8 @@ exports[`input input: set to true 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -2768,6 +3277,8 @@ exports[`input input: set to true 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -2777,6 +3288,8 @@ exports[`input input: set to true 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -2788,6 +3301,8 @@ exports[`input input: set to true 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -2797,6 +3312,8 @@ exports[`input input: set to true 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -2806,6 +3323,8 @@ exports[`input input: set to true 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -2815,6 +3334,8 @@ exports[`input input: set to true 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -2824,6 +3345,8 @@ exports[`input input: set to true 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -2833,6 +3356,8 @@ exports[`input input: set to true 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -2842,6 +3367,8 @@ exports[`input input: set to true 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -2853,6 +3380,8 @@ exports[`input input: set to true 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -2862,6 +3391,8 @@ exports[`input input: set to true 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -2871,6 +3402,8 @@ exports[`input input: set to true 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -2880,6 +3413,8 @@ exports[`input input: set to true 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -2889,6 +3424,8 @@ exports[`input input: set to true 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -2898,6 +3435,8 @@ exports[`input input: set to true 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -2907,6 +3446,8 @@ exports[`input input: set to true 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -2918,6 +3459,8 @@ exports[`input input: set to true 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -2927,6 +3470,8 @@ exports[`input input: set to true 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -2936,6 +3481,8 @@ exports[`input input: set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -2945,6 +3492,8 @@ exports[`input input: set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -2954,6 +3503,8 @@ exports[`input input: set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -2963,6 +3514,8 @@ exports[`input input: set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -2972,6 +3525,8 @@ exports[`input input: set to true 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -2983,6 +3538,8 @@ exports[`input input: set to true 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -2992,6 +3549,8 @@ exports[`input input: set to true 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -3001,6 +3560,8 @@ exports[`input input: set to true 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -3010,6 +3571,8 @@ exports[`input input: set to true 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -3019,6 +3582,8 @@ exports[`input input: set to true 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -3028,6 +3593,8 @@ exports[`input input: set to true 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -3037,6 +3604,8 @@ exports[`input input: set to true 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -3048,6 +3617,8 @@ exports[`input input: set to true 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -3074,6 +3645,7 @@ exports[`inputProps with className specified 1`] = ` />
‹ @@ -3094,12 +3668,16 @@ exports[`inputProps with className specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -3152,6 +3730,8 @@ exports[`inputProps with className specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -3161,6 +3741,8 @@ exports[`inputProps with className specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -3170,6 +3752,8 @@ exports[`inputProps with className specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -3179,6 +3763,8 @@ exports[`inputProps with className specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -3188,6 +3774,8 @@ exports[`inputProps with className specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -3197,6 +3785,8 @@ exports[`inputProps with className specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -3206,6 +3796,8 @@ exports[`inputProps with className specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -3217,6 +3809,8 @@ exports[`inputProps with className specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -3226,6 +3820,8 @@ exports[`inputProps with className specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -3235,6 +3831,8 @@ exports[`inputProps with className specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -3244,6 +3842,8 @@ exports[`inputProps with className specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -3253,6 +3853,8 @@ exports[`inputProps with className specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -3262,6 +3864,8 @@ exports[`inputProps with className specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -3271,6 +3875,8 @@ exports[`inputProps with className specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -3282,6 +3888,8 @@ exports[`inputProps with className specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -3291,6 +3899,8 @@ exports[`inputProps with className specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -3300,6 +3910,8 @@ exports[`inputProps with className specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -3309,6 +3921,8 @@ exports[`inputProps with className specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -3318,6 +3932,8 @@ exports[`inputProps with className specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -3327,6 +3943,8 @@ exports[`inputProps with className specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -3336,6 +3954,8 @@ exports[`inputProps with className specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -3347,6 +3967,8 @@ exports[`inputProps with className specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -3356,6 +3978,8 @@ exports[`inputProps with className specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -3365,6 +3989,8 @@ exports[`inputProps with className specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -3374,6 +4000,8 @@ exports[`inputProps with className specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -3383,6 +4011,8 @@ exports[`inputProps with className specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -3392,6 +4022,8 @@ exports[`inputProps with className specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -3401,6 +4033,8 @@ exports[`inputProps with className specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -3412,6 +4046,8 @@ exports[`inputProps with className specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -3421,6 +4057,8 @@ exports[`inputProps with className specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -3430,6 +4068,8 @@ exports[`inputProps with className specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -3439,6 +4079,8 @@ exports[`inputProps with className specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -3448,6 +4090,8 @@ exports[`inputProps with className specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -3457,6 +4101,8 @@ exports[`inputProps with className specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -3466,6 +4112,8 @@ exports[`inputProps with className specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -3477,6 +4125,8 @@ exports[`inputProps with className specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -3486,6 +4136,8 @@ exports[`inputProps with className specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -3495,6 +4147,8 @@ exports[`inputProps with className specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -3504,6 +4158,8 @@ exports[`inputProps with className specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -3513,6 +4169,8 @@ exports[`inputProps with className specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -3522,6 +4180,8 @@ exports[`inputProps with className specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -3531,6 +4191,8 @@ exports[`inputProps with className specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -3542,6 +4204,8 @@ exports[`inputProps with className specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -3569,6 +4233,7 @@ exports[`inputProps with disabled specified 1`] = ` />
‹ @@ -3589,12 +4256,16 @@ exports[`inputProps with disabled specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -3647,6 +4318,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -3656,6 +4329,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -3665,6 +4340,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -3674,6 +4351,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -3683,6 +4362,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -3692,6 +4373,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -3701,6 +4384,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -3712,6 +4397,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -3721,6 +4408,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -3730,6 +4419,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -3739,6 +4430,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -3748,6 +4441,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -3757,6 +4452,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -3766,6 +4463,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -3777,6 +4476,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -3786,6 +4487,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -3795,6 +4498,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -3804,6 +4509,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -3813,6 +4520,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -3822,6 +4531,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -3831,6 +4542,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -3842,6 +4555,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -3851,6 +4566,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -3860,6 +4577,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -3869,6 +4588,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -3878,6 +4599,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -3887,6 +4610,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -3896,6 +4621,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -3907,6 +4634,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -3916,6 +4645,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -3925,6 +4656,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -3934,6 +4667,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -3943,6 +4678,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -3952,6 +4689,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -3961,6 +4700,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -3972,6 +4713,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -3981,6 +4724,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -3990,6 +4735,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -3999,6 +4746,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -4008,6 +4757,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -4017,6 +4768,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -4026,6 +4779,8 @@ exports[`inputProps with disabled specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -4037,6 +4792,8 @@ exports[`inputProps with disabled specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -4064,6 +4821,7 @@ exports[`inputProps with name specified 1`] = ` />
‹ @@ -4084,12 +4844,16 @@ exports[`inputProps with name specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -4142,6 +4906,8 @@ exports[`inputProps with name specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -4151,6 +4917,8 @@ exports[`inputProps with name specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -4160,6 +4928,8 @@ exports[`inputProps with name specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -4169,6 +4939,8 @@ exports[`inputProps with name specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -4178,6 +4950,8 @@ exports[`inputProps with name specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -4187,6 +4961,8 @@ exports[`inputProps with name specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -4196,6 +4972,8 @@ exports[`inputProps with name specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -4207,6 +4985,8 @@ exports[`inputProps with name specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -4216,6 +4996,8 @@ exports[`inputProps with name specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -4225,6 +5007,8 @@ exports[`inputProps with name specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -4234,6 +5018,8 @@ exports[`inputProps with name specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -4243,6 +5029,8 @@ exports[`inputProps with name specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -4252,6 +5040,8 @@ exports[`inputProps with name specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -4261,6 +5051,8 @@ exports[`inputProps with name specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -4272,6 +5064,8 @@ exports[`inputProps with name specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -4281,6 +5075,8 @@ exports[`inputProps with name specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -4290,6 +5086,8 @@ exports[`inputProps with name specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -4299,6 +5097,8 @@ exports[`inputProps with name specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -4308,6 +5108,8 @@ exports[`inputProps with name specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -4317,6 +5119,8 @@ exports[`inputProps with name specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -4326,6 +5130,8 @@ exports[`inputProps with name specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -4337,6 +5143,8 @@ exports[`inputProps with name specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -4346,6 +5154,8 @@ exports[`inputProps with name specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -4355,6 +5165,8 @@ exports[`inputProps with name specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -4364,6 +5176,8 @@ exports[`inputProps with name specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -4373,6 +5187,8 @@ exports[`inputProps with name specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -4382,6 +5198,8 @@ exports[`inputProps with name specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -4391,6 +5209,8 @@ exports[`inputProps with name specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -4402,6 +5222,8 @@ exports[`inputProps with name specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -4411,6 +5233,8 @@ exports[`inputProps with name specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -4420,6 +5244,8 @@ exports[`inputProps with name specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -4429,6 +5255,8 @@ exports[`inputProps with name specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -4438,6 +5266,8 @@ exports[`inputProps with name specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -4447,6 +5277,8 @@ exports[`inputProps with name specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -4456,6 +5288,8 @@ exports[`inputProps with name specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -4467,6 +5301,8 @@ exports[`inputProps with name specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -4476,6 +5312,8 @@ exports[`inputProps with name specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -4485,6 +5323,8 @@ exports[`inputProps with name specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -4494,6 +5334,8 @@ exports[`inputProps with name specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -4503,6 +5345,8 @@ exports[`inputProps with name specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -4512,6 +5356,8 @@ exports[`inputProps with name specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -4521,6 +5367,8 @@ exports[`inputProps with name specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -4532,6 +5380,8 @@ exports[`inputProps with name specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -4559,6 +5409,7 @@ exports[`inputProps with placeholder specified 1`] = ` />
‹ @@ -4579,12 +5432,16 @@ exports[`inputProps with placeholder specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -4637,6 +5494,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -4646,6 +5505,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -4655,6 +5516,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -4664,6 +5527,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -4673,6 +5538,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -4682,6 +5549,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -4691,6 +5560,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -4702,6 +5573,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -4711,6 +5584,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -4720,6 +5595,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -4729,6 +5606,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -4738,6 +5617,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -4747,6 +5628,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -4756,6 +5639,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -4767,6 +5652,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -4776,6 +5663,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -4785,6 +5674,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -4794,6 +5685,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -4803,6 +5696,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -4812,6 +5707,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -4821,6 +5718,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -4832,6 +5731,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -4841,6 +5742,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -4850,6 +5753,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -4859,6 +5764,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -4868,6 +5775,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -4877,6 +5786,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -4886,6 +5797,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -4897,6 +5810,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -4906,6 +5821,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -4915,6 +5832,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -4924,6 +5843,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -4933,6 +5854,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -4942,6 +5865,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -4951,6 +5876,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -4962,6 +5889,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -4971,6 +5900,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -4980,6 +5911,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -4989,6 +5922,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -4998,6 +5933,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -5007,6 +5944,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -5016,6 +5955,8 @@ exports[`inputProps with placeholder specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -5027,6 +5968,8 @@ exports[`inputProps with placeholder specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -5054,6 +5997,7 @@ exports[`inputProps with required specified 1`] = ` />
‹ @@ -5074,12 +6020,16 @@ exports[`inputProps with required specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -5132,6 +6082,8 @@ exports[`inputProps with required specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -5141,6 +6093,8 @@ exports[`inputProps with required specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -5150,6 +6104,8 @@ exports[`inputProps with required specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -5159,6 +6115,8 @@ exports[`inputProps with required specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -5168,6 +6126,8 @@ exports[`inputProps with required specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -5177,6 +6137,8 @@ exports[`inputProps with required specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -5186,6 +6148,8 @@ exports[`inputProps with required specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -5197,6 +6161,8 @@ exports[`inputProps with required specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -5206,6 +6172,8 @@ exports[`inputProps with required specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -5215,6 +6183,8 @@ exports[`inputProps with required specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -5224,6 +6194,8 @@ exports[`inputProps with required specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -5233,6 +6205,8 @@ exports[`inputProps with required specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -5242,6 +6216,8 @@ exports[`inputProps with required specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -5251,6 +6227,8 @@ exports[`inputProps with required specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -5262,6 +6240,8 @@ exports[`inputProps with required specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -5271,6 +6251,8 @@ exports[`inputProps with required specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -5280,6 +6262,8 @@ exports[`inputProps with required specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -5289,6 +6273,8 @@ exports[`inputProps with required specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -5298,6 +6284,8 @@ exports[`inputProps with required specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -5307,6 +6295,8 @@ exports[`inputProps with required specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -5316,6 +6306,8 @@ exports[`inputProps with required specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -5327,6 +6319,8 @@ exports[`inputProps with required specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -5336,6 +6330,8 @@ exports[`inputProps with required specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -5345,6 +6341,8 @@ exports[`inputProps with required specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -5354,6 +6352,8 @@ exports[`inputProps with required specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -5363,6 +6363,8 @@ exports[`inputProps with required specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -5372,6 +6374,8 @@ exports[`inputProps with required specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -5381,6 +6385,8 @@ exports[`inputProps with required specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -5392,6 +6398,8 @@ exports[`inputProps with required specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -5401,6 +6409,8 @@ exports[`inputProps with required specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -5410,6 +6420,8 @@ exports[`inputProps with required specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -5419,6 +6431,8 @@ exports[`inputProps with required specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -5428,6 +6442,8 @@ exports[`inputProps with required specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -5437,6 +6453,8 @@ exports[`inputProps with required specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -5446,6 +6464,8 @@ exports[`inputProps with required specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -5457,6 +6477,8 @@ exports[`inputProps with required specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -5466,6 +6488,8 @@ exports[`inputProps with required specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -5475,6 +6499,8 @@ exports[`inputProps with required specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -5484,6 +6510,8 @@ exports[`inputProps with required specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -5493,6 +6521,8 @@ exports[`inputProps with required specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -5502,6 +6532,8 @@ exports[`inputProps with required specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -5511,6 +6543,8 @@ exports[`inputProps with required specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -5522,6 +6556,8 @@ exports[`inputProps with required specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -5548,6 +6584,7 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` />
‹ @@ -5568,12 +6607,16 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -5832,6 +6875,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -5841,6 +6886,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -5850,6 +6897,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -5861,6 +6910,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -5870,6 +6921,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -5879,6 +6932,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -5888,6 +6943,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -5897,6 +6954,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -5906,6 +6965,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -5915,6 +6976,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -5926,6 +6989,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -5935,6 +7000,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -5944,6 +7011,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -5953,6 +7022,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -5962,6 +7033,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -5971,6 +7044,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -5980,6 +7055,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -5991,6 +7068,8 @@ exports[`isValidDate: only valid if after yesterday 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -6017,6 +7096,7 @@ exports[`open set to false 1`] = ` />
‹ @@ -6037,12 +7119,16 @@ exports[`open set to false 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -6095,6 +7181,8 @@ exports[`open set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -6104,6 +7192,8 @@ exports[`open set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -6113,6 +7203,8 @@ exports[`open set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -6122,6 +7214,8 @@ exports[`open set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -6131,6 +7225,8 @@ exports[`open set to false 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -6140,6 +7236,8 @@ exports[`open set to false 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -6149,6 +7247,8 @@ exports[`open set to false 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -6160,6 +7260,8 @@ exports[`open set to false 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -6169,6 +7271,8 @@ exports[`open set to false 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -6178,6 +7282,8 @@ exports[`open set to false 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -6187,6 +7293,8 @@ exports[`open set to false 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -6196,6 +7304,8 @@ exports[`open set to false 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -6205,6 +7315,8 @@ exports[`open set to false 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -6214,6 +7326,8 @@ exports[`open set to false 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -6225,6 +7339,8 @@ exports[`open set to false 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -6234,6 +7350,8 @@ exports[`open set to false 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -6243,6 +7361,8 @@ exports[`open set to false 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -6252,6 +7372,8 @@ exports[`open set to false 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -6261,6 +7383,8 @@ exports[`open set to false 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -6270,6 +7394,8 @@ exports[`open set to false 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -6279,6 +7405,8 @@ exports[`open set to false 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -6290,6 +7418,8 @@ exports[`open set to false 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -6299,6 +7429,8 @@ exports[`open set to false 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -6308,6 +7440,8 @@ exports[`open set to false 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -6317,6 +7451,8 @@ exports[`open set to false 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -6326,6 +7462,8 @@ exports[`open set to false 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -6335,6 +7473,8 @@ exports[`open set to false 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -6344,6 +7484,8 @@ exports[`open set to false 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -6355,6 +7497,8 @@ exports[`open set to false 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -6364,6 +7508,8 @@ exports[`open set to false 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -6373,6 +7519,8 @@ exports[`open set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -6382,6 +7530,8 @@ exports[`open set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -6391,6 +7541,8 @@ exports[`open set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -6400,6 +7552,8 @@ exports[`open set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -6409,6 +7563,8 @@ exports[`open set to false 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -6420,6 +7576,8 @@ exports[`open set to false 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -6429,6 +7587,8 @@ exports[`open set to false 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -6438,6 +7598,8 @@ exports[`open set to false 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -6447,6 +7609,8 @@ exports[`open set to false 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -6456,6 +7620,8 @@ exports[`open set to false 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -6465,6 +7631,8 @@ exports[`open set to false 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -6474,6 +7642,8 @@ exports[`open set to false 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -6485,6 +7655,8 @@ exports[`open set to false 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -6511,6 +7683,7 @@ exports[`open set to true 1`] = ` />
‹ @@ -6531,12 +7706,16 @@ exports[`open set to true 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -6589,6 +7768,8 @@ exports[`open set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -6598,6 +7779,8 @@ exports[`open set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -6607,6 +7790,8 @@ exports[`open set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -6616,6 +7801,8 @@ exports[`open set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -6625,6 +7812,8 @@ exports[`open set to true 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -6634,6 +7823,8 @@ exports[`open set to true 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -6643,6 +7834,8 @@ exports[`open set to true 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -6654,6 +7847,8 @@ exports[`open set to true 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -6663,6 +7858,8 @@ exports[`open set to true 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -6672,6 +7869,8 @@ exports[`open set to true 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -6681,6 +7880,8 @@ exports[`open set to true 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -6690,6 +7891,8 @@ exports[`open set to true 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -6699,6 +7902,8 @@ exports[`open set to true 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -6708,6 +7913,8 @@ exports[`open set to true 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -6719,6 +7926,8 @@ exports[`open set to true 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -6728,6 +7937,8 @@ exports[`open set to true 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -6737,6 +7948,8 @@ exports[`open set to true 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -6746,6 +7959,8 @@ exports[`open set to true 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -6755,6 +7970,8 @@ exports[`open set to true 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -6764,6 +7981,8 @@ exports[`open set to true 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -6773,6 +7992,8 @@ exports[`open set to true 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -6784,6 +8005,8 @@ exports[`open set to true 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -6793,6 +8016,8 @@ exports[`open set to true 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -6802,6 +8027,8 @@ exports[`open set to true 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -6811,6 +8038,8 @@ exports[`open set to true 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -6820,6 +8049,8 @@ exports[`open set to true 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -6829,6 +8060,8 @@ exports[`open set to true 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -6838,6 +8071,8 @@ exports[`open set to true 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -6849,6 +8084,8 @@ exports[`open set to true 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -6858,6 +8095,8 @@ exports[`open set to true 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -6867,6 +8106,8 @@ exports[`open set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -6876,6 +8117,8 @@ exports[`open set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -6885,6 +8128,8 @@ exports[`open set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -6894,6 +8139,8 @@ exports[`open set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -6903,6 +8150,8 @@ exports[`open set to true 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -6914,6 +8163,8 @@ exports[`open set to true 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -6923,6 +8174,8 @@ exports[`open set to true 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -6932,6 +8185,8 @@ exports[`open set to true 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -6941,6 +8196,8 @@ exports[`open set to true 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -6950,6 +8207,8 @@ exports[`open set to true 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -6959,6 +8218,8 @@ exports[`open set to true 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -6968,6 +8229,8 @@ exports[`open set to true 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -6979,6 +8242,8 @@ exports[`open set to true 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -7005,6 +8270,7 @@ exports[`renderDay: specified 1`] = ` />
‹ @@ -7025,12 +8293,16 @@ exports[`renderDay: specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -7083,6 +8355,8 @@ exports[`renderDay: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 027 @@ -7092,6 +8366,8 @@ exports[`renderDay: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 028 @@ -7101,6 +8377,8 @@ exports[`renderDay: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 029 @@ -7110,6 +8388,8 @@ exports[`renderDay: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 030 @@ -7119,6 +8399,8 @@ exports[`renderDay: specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 01 @@ -7128,6 +8410,8 @@ exports[`renderDay: specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 02 @@ -7137,6 +8421,8 @@ exports[`renderDay: specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 03 @@ -7148,6 +8434,8 @@ exports[`renderDay: specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 04 @@ -7157,6 +8445,8 @@ exports[`renderDay: specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 05 @@ -7166,6 +8456,8 @@ exports[`renderDay: specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 06 @@ -7175,6 +8467,8 @@ exports[`renderDay: specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 07 @@ -7184,6 +8478,8 @@ exports[`renderDay: specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 08 @@ -7193,6 +8489,8 @@ exports[`renderDay: specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 09 @@ -7202,6 +8500,8 @@ exports[`renderDay: specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 010 @@ -7213,6 +8513,8 @@ exports[`renderDay: specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 011 @@ -7222,6 +8524,8 @@ exports[`renderDay: specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 012 @@ -7231,6 +8535,8 @@ exports[`renderDay: specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 013 @@ -7240,6 +8546,8 @@ exports[`renderDay: specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 014 @@ -7249,6 +8557,8 @@ exports[`renderDay: specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 015 @@ -7258,6 +8568,8 @@ exports[`renderDay: specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 016 @@ -7267,6 +8579,8 @@ exports[`renderDay: specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 017 @@ -7278,6 +8592,8 @@ exports[`renderDay: specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 018 @@ -7287,6 +8603,8 @@ exports[`renderDay: specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 019 @@ -7296,6 +8614,8 @@ exports[`renderDay: specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 020 @@ -7305,6 +8625,8 @@ exports[`renderDay: specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 021 @@ -7314,6 +8636,8 @@ exports[`renderDay: specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 022 @@ -7323,6 +8647,8 @@ exports[`renderDay: specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 023 @@ -7332,6 +8658,8 @@ exports[`renderDay: specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 024 @@ -7343,6 +8671,8 @@ exports[`renderDay: specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 025 @@ -7352,6 +8682,8 @@ exports[`renderDay: specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 026 @@ -7361,6 +8693,8 @@ exports[`renderDay: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 027 @@ -7370,6 +8704,8 @@ exports[`renderDay: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 028 @@ -7379,6 +8715,8 @@ exports[`renderDay: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 029 @@ -7388,6 +8726,8 @@ exports[`renderDay: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 030 @@ -7397,6 +8737,8 @@ exports[`renderDay: specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 031 @@ -7408,6 +8750,8 @@ exports[`renderDay: specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 01 @@ -7417,6 +8761,8 @@ exports[`renderDay: specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 02 @@ -7426,6 +8772,8 @@ exports[`renderDay: specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 03 @@ -7435,6 +8783,8 @@ exports[`renderDay: specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 04 @@ -7444,6 +8794,8 @@ exports[`renderDay: specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 05 @@ -7453,6 +8805,8 @@ exports[`renderDay: specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 06 @@ -7462,6 +8816,8 @@ exports[`renderDay: specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 07 @@ -7473,6 +8829,8 @@ exports[`renderDay: specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -7499,6 +8857,7 @@ exports[`renderMonth: specified 1`] = ` />
‹ @@ -7519,12 +8880,16 @@ exports[`renderMonth: specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -7577,6 +8942,8 @@ exports[`renderMonth: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -7586,6 +8953,8 @@ exports[`renderMonth: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -7595,6 +8964,8 @@ exports[`renderMonth: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -7604,6 +8975,8 @@ exports[`renderMonth: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -7613,6 +8986,8 @@ exports[`renderMonth: specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -7622,6 +8997,8 @@ exports[`renderMonth: specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -7631,6 +9008,8 @@ exports[`renderMonth: specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -7642,6 +9021,8 @@ exports[`renderMonth: specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -7651,6 +9032,8 @@ exports[`renderMonth: specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -7660,6 +9043,8 @@ exports[`renderMonth: specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -7669,6 +9054,8 @@ exports[`renderMonth: specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -7678,6 +9065,8 @@ exports[`renderMonth: specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -7687,6 +9076,8 @@ exports[`renderMonth: specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -7696,6 +9087,8 @@ exports[`renderMonth: specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -7707,6 +9100,8 @@ exports[`renderMonth: specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -7716,6 +9111,8 @@ exports[`renderMonth: specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -7725,6 +9122,8 @@ exports[`renderMonth: specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -7734,6 +9133,8 @@ exports[`renderMonth: specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -7743,6 +9144,8 @@ exports[`renderMonth: specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -7752,6 +9155,8 @@ exports[`renderMonth: specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -7761,6 +9166,8 @@ exports[`renderMonth: specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -7772,6 +9179,8 @@ exports[`renderMonth: specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -7781,6 +9190,8 @@ exports[`renderMonth: specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -7790,6 +9201,8 @@ exports[`renderMonth: specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -7799,6 +9212,8 @@ exports[`renderMonth: specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -7808,6 +9223,8 @@ exports[`renderMonth: specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -7817,6 +9234,8 @@ exports[`renderMonth: specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -7826,6 +9245,8 @@ exports[`renderMonth: specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -7837,6 +9258,8 @@ exports[`renderMonth: specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -7846,6 +9269,8 @@ exports[`renderMonth: specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -7855,6 +9280,8 @@ exports[`renderMonth: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -7864,6 +9291,8 @@ exports[`renderMonth: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -7873,6 +9302,8 @@ exports[`renderMonth: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -7882,6 +9313,8 @@ exports[`renderMonth: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -7891,6 +9324,8 @@ exports[`renderMonth: specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -7902,6 +9337,8 @@ exports[`renderMonth: specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -7911,6 +9348,8 @@ exports[`renderMonth: specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -7920,6 +9359,8 @@ exports[`renderMonth: specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -7929,6 +9370,8 @@ exports[`renderMonth: specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -7938,6 +9381,8 @@ exports[`renderMonth: specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -7947,6 +9392,8 @@ exports[`renderMonth: specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -7956,6 +9403,8 @@ exports[`renderMonth: specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -7967,6 +9416,8 @@ exports[`renderMonth: specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -7993,6 +9444,7 @@ exports[`renderYear: specified 1`] = ` />
‹ @@ -8013,12 +9467,16 @@ exports[`renderYear: specified 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -8071,6 +9529,8 @@ exports[`renderYear: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -8080,6 +9540,8 @@ exports[`renderYear: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -8089,6 +9551,8 @@ exports[`renderYear: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -8098,6 +9562,8 @@ exports[`renderYear: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -8107,6 +9573,8 @@ exports[`renderYear: specified 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -8116,6 +9584,8 @@ exports[`renderYear: specified 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -8125,6 +9595,8 @@ exports[`renderYear: specified 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -8136,6 +9608,8 @@ exports[`renderYear: specified 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -8145,6 +9619,8 @@ exports[`renderYear: specified 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -8154,6 +9630,8 @@ exports[`renderYear: specified 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -8163,6 +9641,8 @@ exports[`renderYear: specified 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -8172,6 +9652,8 @@ exports[`renderYear: specified 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -8181,6 +9663,8 @@ exports[`renderYear: specified 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -8190,6 +9674,8 @@ exports[`renderYear: specified 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -8201,6 +9687,8 @@ exports[`renderYear: specified 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -8210,6 +9698,8 @@ exports[`renderYear: specified 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -8219,6 +9709,8 @@ exports[`renderYear: specified 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -8228,6 +9720,8 @@ exports[`renderYear: specified 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -8237,6 +9731,8 @@ exports[`renderYear: specified 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -8246,6 +9742,8 @@ exports[`renderYear: specified 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -8255,6 +9753,8 @@ exports[`renderYear: specified 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -8266,6 +9766,8 @@ exports[`renderYear: specified 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -8275,6 +9777,8 @@ exports[`renderYear: specified 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -8284,6 +9788,8 @@ exports[`renderYear: specified 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -8293,6 +9799,8 @@ exports[`renderYear: specified 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -8302,6 +9810,8 @@ exports[`renderYear: specified 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -8311,6 +9821,8 @@ exports[`renderYear: specified 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -8320,6 +9832,8 @@ exports[`renderYear: specified 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -8331,6 +9845,8 @@ exports[`renderYear: specified 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -8340,6 +9856,8 @@ exports[`renderYear: specified 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -8349,6 +9867,8 @@ exports[`renderYear: specified 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -8358,6 +9878,8 @@ exports[`renderYear: specified 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -8367,6 +9889,8 @@ exports[`renderYear: specified 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -8376,6 +9900,8 @@ exports[`renderYear: specified 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -8385,6 +9911,8 @@ exports[`renderYear: specified 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -8396,6 +9924,8 @@ exports[`renderYear: specified 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -8405,6 +9935,8 @@ exports[`renderYear: specified 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -8414,6 +9946,8 @@ exports[`renderYear: specified 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -8423,6 +9957,8 @@ exports[`renderYear: specified 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -8432,6 +9968,8 @@ exports[`renderYear: specified 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -8441,6 +9979,8 @@ exports[`renderYear: specified 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -8450,6 +9990,8 @@ exports[`renderYear: specified 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -8461,6 +10003,8 @@ exports[`renderYear: specified 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -8487,6 +10031,7 @@ exports[`timeFormat set to false 1`] = ` />
‹ @@ -8507,12 +10054,16 @@ exports[`timeFormat set to false 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -8565,6 +10116,8 @@ exports[`timeFormat set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -8574,6 +10127,8 @@ exports[`timeFormat set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -8583,6 +10138,8 @@ exports[`timeFormat set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -8592,6 +10149,8 @@ exports[`timeFormat set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -8601,6 +10160,8 @@ exports[`timeFormat set to false 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -8610,6 +10171,8 @@ exports[`timeFormat set to false 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -8619,6 +10182,8 @@ exports[`timeFormat set to false 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -8630,6 +10195,8 @@ exports[`timeFormat set to false 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -8639,6 +10206,8 @@ exports[`timeFormat set to false 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -8648,6 +10217,8 @@ exports[`timeFormat set to false 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -8657,6 +10228,8 @@ exports[`timeFormat set to false 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -8666,6 +10239,8 @@ exports[`timeFormat set to false 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -8675,6 +10250,8 @@ exports[`timeFormat set to false 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -8684,6 +10261,8 @@ exports[`timeFormat set to false 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -8695,6 +10274,8 @@ exports[`timeFormat set to false 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -8704,6 +10285,8 @@ exports[`timeFormat set to false 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -8713,6 +10296,8 @@ exports[`timeFormat set to false 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -8722,6 +10307,8 @@ exports[`timeFormat set to false 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -8731,6 +10318,8 @@ exports[`timeFormat set to false 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -8740,6 +10329,8 @@ exports[`timeFormat set to false 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -8749,6 +10340,8 @@ exports[`timeFormat set to false 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -8760,6 +10353,8 @@ exports[`timeFormat set to false 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -8769,6 +10364,8 @@ exports[`timeFormat set to false 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -8778,6 +10375,8 @@ exports[`timeFormat set to false 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -8787,6 +10386,8 @@ exports[`timeFormat set to false 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -8796,6 +10397,8 @@ exports[`timeFormat set to false 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -8805,6 +10408,8 @@ exports[`timeFormat set to false 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -8814,6 +10419,8 @@ exports[`timeFormat set to false 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -8825,6 +10432,8 @@ exports[`timeFormat set to false 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -8834,6 +10443,8 @@ exports[`timeFormat set to false 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -8843,6 +10454,8 @@ exports[`timeFormat set to false 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -8852,6 +10465,8 @@ exports[`timeFormat set to false 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -8861,6 +10476,8 @@ exports[`timeFormat set to false 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -8870,6 +10487,8 @@ exports[`timeFormat set to false 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -8879,6 +10498,8 @@ exports[`timeFormat set to false 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -8890,6 +10511,8 @@ exports[`timeFormat set to false 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -8899,6 +10522,8 @@ exports[`timeFormat set to false 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -8908,6 +10533,8 @@ exports[`timeFormat set to false 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -8917,6 +10544,8 @@ exports[`timeFormat set to false 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -8926,6 +10555,8 @@ exports[`timeFormat set to false 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -8935,6 +10566,8 @@ exports[`timeFormat set to false 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -8944,6 +10577,8 @@ exports[`timeFormat set to false 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -8970,6 +10605,7 @@ exports[`timeFormat set to true 1`] = ` />
‹ @@ -8990,12 +10628,16 @@ exports[`timeFormat set to true 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -9048,6 +10690,8 @@ exports[`timeFormat set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -9057,6 +10701,8 @@ exports[`timeFormat set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -9066,6 +10712,8 @@ exports[`timeFormat set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -9075,6 +10723,8 @@ exports[`timeFormat set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -9084,6 +10734,8 @@ exports[`timeFormat set to true 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -9093,6 +10745,8 @@ exports[`timeFormat set to true 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -9102,6 +10756,8 @@ exports[`timeFormat set to true 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -9113,6 +10769,8 @@ exports[`timeFormat set to true 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -9122,6 +10780,8 @@ exports[`timeFormat set to true 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -9131,6 +10791,8 @@ exports[`timeFormat set to true 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -9140,6 +10802,8 @@ exports[`timeFormat set to true 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -9149,6 +10813,8 @@ exports[`timeFormat set to true 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -9158,6 +10824,8 @@ exports[`timeFormat set to true 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -9167,6 +10835,8 @@ exports[`timeFormat set to true 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -9178,6 +10848,8 @@ exports[`timeFormat set to true 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -9187,6 +10859,8 @@ exports[`timeFormat set to true 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -9196,6 +10870,8 @@ exports[`timeFormat set to true 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -9205,6 +10881,8 @@ exports[`timeFormat set to true 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -9214,6 +10892,8 @@ exports[`timeFormat set to true 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -9223,6 +10903,8 @@ exports[`timeFormat set to true 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -9232,6 +10914,8 @@ exports[`timeFormat set to true 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -9243,6 +10927,8 @@ exports[`timeFormat set to true 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -9252,6 +10938,8 @@ exports[`timeFormat set to true 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -9261,6 +10949,8 @@ exports[`timeFormat set to true 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -9270,6 +10960,8 @@ exports[`timeFormat set to true 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -9279,6 +10971,8 @@ exports[`timeFormat set to true 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -9288,6 +10982,8 @@ exports[`timeFormat set to true 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -9297,6 +10993,8 @@ exports[`timeFormat set to true 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -9308,6 +11006,8 @@ exports[`timeFormat set to true 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -9317,6 +11017,8 @@ exports[`timeFormat set to true 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -9326,6 +11028,8 @@ exports[`timeFormat set to true 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -9335,6 +11039,8 @@ exports[`timeFormat set to true 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -9344,6 +11050,8 @@ exports[`timeFormat set to true 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -9353,6 +11061,8 @@ exports[`timeFormat set to true 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -9362,6 +11072,8 @@ exports[`timeFormat set to true 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -9373,6 +11085,8 @@ exports[`timeFormat set to true 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -9382,6 +11096,8 @@ exports[`timeFormat set to true 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -9391,6 +11107,8 @@ exports[`timeFormat set to true 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -9400,6 +11118,8 @@ exports[`timeFormat set to true 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -9409,6 +11129,8 @@ exports[`timeFormat set to true 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -9418,6 +11140,8 @@ exports[`timeFormat set to true 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -9427,6 +11151,8 @@ exports[`timeFormat set to true 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -9438,6 +11164,8 @@ exports[`timeFormat set to true 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -9464,6 +11192,7 @@ exports[`value: set to arbitrary value 1`] = ` />
‹ @@ -9484,12 +11215,16 @@ exports[`value: set to arbitrary value 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -9542,6 +11277,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -9551,6 +11288,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -9560,6 +11299,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -9569,6 +11310,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -9578,6 +11321,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -9587,6 +11332,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -9596,6 +11343,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -9607,6 +11356,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -9616,6 +11367,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -9625,6 +11378,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -9634,6 +11389,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -9643,6 +11400,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -9652,6 +11411,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -9661,6 +11422,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -9672,6 +11435,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -9681,6 +11446,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -9690,6 +11457,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -9699,6 +11468,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -9708,6 +11479,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -9717,6 +11490,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -9726,6 +11501,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -9737,6 +11514,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -9746,6 +11525,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -9755,6 +11536,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -9764,6 +11547,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -9773,6 +11558,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -9782,6 +11569,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -9791,6 +11580,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -9802,6 +11593,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -9811,6 +11604,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -9820,6 +11615,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -9829,6 +11626,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -9838,6 +11637,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -9847,6 +11648,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -9856,6 +11659,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -9867,6 +11672,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -9876,6 +11683,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -9885,6 +11694,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -9894,6 +11705,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -9903,6 +11716,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -9912,6 +11727,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -9921,6 +11738,8 @@ exports[`value: set to arbitrary value 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -9932,6 +11751,8 @@ exports[`value: set to arbitrary value 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -9958,6 +11779,7 @@ exports[`viewMode set to days 1`] = ` />
‹ @@ -9978,12 +11802,16 @@ exports[`viewMode set to days 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -10036,6 +11864,8 @@ exports[`viewMode set to days 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -10045,6 +11875,8 @@ exports[`viewMode set to days 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -10054,6 +11886,8 @@ exports[`viewMode set to days 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -10063,6 +11897,8 @@ exports[`viewMode set to days 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -10072,6 +11908,8 @@ exports[`viewMode set to days 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -10081,6 +11919,8 @@ exports[`viewMode set to days 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -10090,6 +11930,8 @@ exports[`viewMode set to days 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -10101,6 +11943,8 @@ exports[`viewMode set to days 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -10110,6 +11954,8 @@ exports[`viewMode set to days 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -10119,6 +11965,8 @@ exports[`viewMode set to days 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -10128,6 +11976,8 @@ exports[`viewMode set to days 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -10137,6 +11987,8 @@ exports[`viewMode set to days 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -10146,6 +11998,8 @@ exports[`viewMode set to days 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -10155,6 +12009,8 @@ exports[`viewMode set to days 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -10166,6 +12022,8 @@ exports[`viewMode set to days 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -10175,6 +12033,8 @@ exports[`viewMode set to days 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -10184,6 +12044,8 @@ exports[`viewMode set to days 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -10193,6 +12055,8 @@ exports[`viewMode set to days 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -10202,6 +12066,8 @@ exports[`viewMode set to days 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -10211,6 +12077,8 @@ exports[`viewMode set to days 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -10220,6 +12088,8 @@ exports[`viewMode set to days 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -10231,6 +12101,8 @@ exports[`viewMode set to days 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -10240,6 +12112,8 @@ exports[`viewMode set to days 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -10249,6 +12123,8 @@ exports[`viewMode set to days 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -10258,6 +12134,8 @@ exports[`viewMode set to days 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -10267,6 +12145,8 @@ exports[`viewMode set to days 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -10276,6 +12156,8 @@ exports[`viewMode set to days 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -10285,6 +12167,8 @@ exports[`viewMode set to days 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -10296,6 +12180,8 @@ exports[`viewMode set to days 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -10305,6 +12191,8 @@ exports[`viewMode set to days 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -10314,6 +12202,8 @@ exports[`viewMode set to days 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -10323,6 +12213,8 @@ exports[`viewMode set to days 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -10332,6 +12224,8 @@ exports[`viewMode set to days 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -10341,6 +12235,8 @@ exports[`viewMode set to days 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -10350,6 +12246,8 @@ exports[`viewMode set to days 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -10361,6 +12259,8 @@ exports[`viewMode set to days 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -10370,6 +12270,8 @@ exports[`viewMode set to days 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -10379,6 +12281,8 @@ exports[`viewMode set to days 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -10388,6 +12292,8 @@ exports[`viewMode set to days 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -10397,6 +12303,8 @@ exports[`viewMode set to days 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -10406,6 +12314,8 @@ exports[`viewMode set to days 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -10415,6 +12325,8 @@ exports[`viewMode set to days 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -10426,6 +12338,8 @@ exports[`viewMode set to days 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -10452,6 +12366,7 @@ exports[`viewMode set to months 1`] = ` />
‹ @@ -10472,12 +12389,16 @@ exports[`viewMode set to months 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -10530,6 +12451,8 @@ exports[`viewMode set to months 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -10539,6 +12462,8 @@ exports[`viewMode set to months 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -10548,6 +12473,8 @@ exports[`viewMode set to months 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -10557,6 +12484,8 @@ exports[`viewMode set to months 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -10566,6 +12495,8 @@ exports[`viewMode set to months 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -10575,6 +12506,8 @@ exports[`viewMode set to months 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -10584,6 +12517,8 @@ exports[`viewMode set to months 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -10595,6 +12530,8 @@ exports[`viewMode set to months 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -10604,6 +12541,8 @@ exports[`viewMode set to months 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -10613,6 +12552,8 @@ exports[`viewMode set to months 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -10622,6 +12563,8 @@ exports[`viewMode set to months 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -10631,6 +12574,8 @@ exports[`viewMode set to months 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -10640,6 +12585,8 @@ exports[`viewMode set to months 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -10649,6 +12596,8 @@ exports[`viewMode set to months 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -10660,6 +12609,8 @@ exports[`viewMode set to months 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -10669,6 +12620,8 @@ exports[`viewMode set to months 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -10678,6 +12631,8 @@ exports[`viewMode set to months 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -10687,6 +12642,8 @@ exports[`viewMode set to months 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -10696,6 +12653,8 @@ exports[`viewMode set to months 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -10705,6 +12664,8 @@ exports[`viewMode set to months 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -10714,6 +12675,8 @@ exports[`viewMode set to months 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -10725,6 +12688,8 @@ exports[`viewMode set to months 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -10734,6 +12699,8 @@ exports[`viewMode set to months 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -10743,6 +12710,8 @@ exports[`viewMode set to months 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -10752,6 +12721,8 @@ exports[`viewMode set to months 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -10761,6 +12732,8 @@ exports[`viewMode set to months 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -10770,6 +12743,8 @@ exports[`viewMode set to months 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -10779,6 +12754,8 @@ exports[`viewMode set to months 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -10790,6 +12767,8 @@ exports[`viewMode set to months 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -10799,6 +12778,8 @@ exports[`viewMode set to months 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -10808,6 +12789,8 @@ exports[`viewMode set to months 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -10817,6 +12800,8 @@ exports[`viewMode set to months 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -10826,6 +12811,8 @@ exports[`viewMode set to months 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -10835,6 +12822,8 @@ exports[`viewMode set to months 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -10844,6 +12833,8 @@ exports[`viewMode set to months 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -10855,6 +12846,8 @@ exports[`viewMode set to months 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -10864,6 +12857,8 @@ exports[`viewMode set to months 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -10873,6 +12868,8 @@ exports[`viewMode set to months 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -10882,6 +12879,8 @@ exports[`viewMode set to months 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -10891,6 +12890,8 @@ exports[`viewMode set to months 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -10900,6 +12901,8 @@ exports[`viewMode set to months 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -10909,6 +12912,8 @@ exports[`viewMode set to months 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -10920,6 +12925,8 @@ exports[`viewMode set to months 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -10946,6 +12953,7 @@ exports[`viewMode set to time 1`] = ` />
‹ @@ -10966,12 +12976,16 @@ exports[`viewMode set to time 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -11024,6 +13038,8 @@ exports[`viewMode set to time 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -11033,6 +13049,8 @@ exports[`viewMode set to time 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -11042,6 +13060,8 @@ exports[`viewMode set to time 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -11051,6 +13071,8 @@ exports[`viewMode set to time 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -11060,6 +13082,8 @@ exports[`viewMode set to time 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -11069,6 +13093,8 @@ exports[`viewMode set to time 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -11078,6 +13104,8 @@ exports[`viewMode set to time 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -11089,6 +13117,8 @@ exports[`viewMode set to time 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -11098,6 +13128,8 @@ exports[`viewMode set to time 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -11107,6 +13139,8 @@ exports[`viewMode set to time 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -11116,6 +13150,8 @@ exports[`viewMode set to time 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -11125,6 +13161,8 @@ exports[`viewMode set to time 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -11134,6 +13172,8 @@ exports[`viewMode set to time 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -11143,6 +13183,8 @@ exports[`viewMode set to time 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -11154,6 +13196,8 @@ exports[`viewMode set to time 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -11163,6 +13207,8 @@ exports[`viewMode set to time 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -11172,6 +13218,8 @@ exports[`viewMode set to time 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -11181,6 +13229,8 @@ exports[`viewMode set to time 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -11190,6 +13240,8 @@ exports[`viewMode set to time 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -11199,6 +13251,8 @@ exports[`viewMode set to time 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -11208,6 +13262,8 @@ exports[`viewMode set to time 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -11219,6 +13275,8 @@ exports[`viewMode set to time 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -11228,6 +13286,8 @@ exports[`viewMode set to time 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -11237,6 +13297,8 @@ exports[`viewMode set to time 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -11246,6 +13308,8 @@ exports[`viewMode set to time 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -11255,6 +13319,8 @@ exports[`viewMode set to time 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -11264,6 +13330,8 @@ exports[`viewMode set to time 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -11273,6 +13341,8 @@ exports[`viewMode set to time 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -11284,6 +13354,8 @@ exports[`viewMode set to time 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -11293,6 +13365,8 @@ exports[`viewMode set to time 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -11302,6 +13376,8 @@ exports[`viewMode set to time 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -11311,6 +13387,8 @@ exports[`viewMode set to time 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -11320,6 +13398,8 @@ exports[`viewMode set to time 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -11329,6 +13409,8 @@ exports[`viewMode set to time 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -11338,6 +13420,8 @@ exports[`viewMode set to time 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -11349,6 +13433,8 @@ exports[`viewMode set to time 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -11358,6 +13444,8 @@ exports[`viewMode set to time 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -11367,6 +13455,8 @@ exports[`viewMode set to time 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -11376,6 +13466,8 @@ exports[`viewMode set to time 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -11385,6 +13477,8 @@ exports[`viewMode set to time 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -11394,6 +13488,8 @@ exports[`viewMode set to time 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -11403,6 +13499,8 @@ exports[`viewMode set to time 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -11414,6 +13512,8 @@ exports[`viewMode set to time 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM @@ -11440,6 +13540,7 @@ exports[`viewMode set to years 1`] = ` />
‹ @@ -11460,12 +13563,16 @@ exports[`viewMode set to years 1`] = ` colSpan={5} data-value={11} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > December 2016 › @@ -11518,6 +13625,8 @@ exports[`viewMode set to years 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -11527,6 +13636,8 @@ exports[`viewMode set to years 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -11536,6 +13647,8 @@ exports[`viewMode set to years 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -11545,6 +13658,8 @@ exports[`viewMode set to years 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -11554,6 +13669,8 @@ exports[`viewMode set to years 1`] = ` data-value={1} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -11563,6 +13680,8 @@ exports[`viewMode set to years 1`] = ` data-value={2} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -11572,6 +13691,8 @@ exports[`viewMode set to years 1`] = ` data-value={3} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -11583,6 +13704,8 @@ exports[`viewMode set to years 1`] = ` data-value={4} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -11592,6 +13715,8 @@ exports[`viewMode set to years 1`] = ` data-value={5} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -11601,6 +13726,8 @@ exports[`viewMode set to years 1`] = ` data-value={6} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -11610,6 +13737,8 @@ exports[`viewMode set to years 1`] = ` data-value={7} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -11619,6 +13748,8 @@ exports[`viewMode set to years 1`] = ` data-value={8} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 8 @@ -11628,6 +13759,8 @@ exports[`viewMode set to years 1`] = ` data-value={9} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 9 @@ -11637,6 +13770,8 @@ exports[`viewMode set to years 1`] = ` data-value={10} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 10 @@ -11648,6 +13783,8 @@ exports[`viewMode set to years 1`] = ` data-value={11} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 11 @@ -11657,6 +13794,8 @@ exports[`viewMode set to years 1`] = ` data-value={12} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12 @@ -11666,6 +13805,8 @@ exports[`viewMode set to years 1`] = ` data-value={13} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 13 @@ -11675,6 +13816,8 @@ exports[`viewMode set to years 1`] = ` data-value={14} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 14 @@ -11684,6 +13827,8 @@ exports[`viewMode set to years 1`] = ` data-value={15} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 15 @@ -11693,6 +13838,8 @@ exports[`viewMode set to years 1`] = ` data-value={16} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 16 @@ -11702,6 +13849,8 @@ exports[`viewMode set to years 1`] = ` data-value={17} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 17 @@ -11713,6 +13862,8 @@ exports[`viewMode set to years 1`] = ` data-value={18} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 18 @@ -11722,6 +13873,8 @@ exports[`viewMode set to years 1`] = ` data-value={19} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 19 @@ -11731,6 +13884,8 @@ exports[`viewMode set to years 1`] = ` data-value={20} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 20 @@ -11740,6 +13895,8 @@ exports[`viewMode set to years 1`] = ` data-value={21} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 21 @@ -11749,6 +13906,8 @@ exports[`viewMode set to years 1`] = ` data-value={22} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 22 @@ -11758,6 +13917,8 @@ exports[`viewMode set to years 1`] = ` data-value={23} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 23 @@ -11767,6 +13928,8 @@ exports[`viewMode set to years 1`] = ` data-value={24} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 24 @@ -11778,6 +13941,8 @@ exports[`viewMode set to years 1`] = ` data-value={25} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 25 @@ -11787,6 +13952,8 @@ exports[`viewMode set to years 1`] = ` data-value={26} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 26 @@ -11796,6 +13963,8 @@ exports[`viewMode set to years 1`] = ` data-value={27} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 27 @@ -11805,6 +13974,8 @@ exports[`viewMode set to years 1`] = ` data-value={28} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 28 @@ -11814,6 +13985,8 @@ exports[`viewMode set to years 1`] = ` data-value={29} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 29 @@ -11823,6 +13996,8 @@ exports[`viewMode set to years 1`] = ` data-value={30} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 30 @@ -11832,6 +14007,8 @@ exports[`viewMode set to years 1`] = ` data-value={31} data-year={2016} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 31 @@ -11843,6 +14020,8 @@ exports[`viewMode set to years 1`] = ` data-value={1} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 1 @@ -11852,6 +14031,8 @@ exports[`viewMode set to years 1`] = ` data-value={2} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 2 @@ -11861,6 +14042,8 @@ exports[`viewMode set to years 1`] = ` data-value={3} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 3 @@ -11870,6 +14053,8 @@ exports[`viewMode set to years 1`] = ` data-value={4} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 4 @@ -11879,6 +14064,8 @@ exports[`viewMode set to years 1`] = ` data-value={5} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 5 @@ -11888,6 +14075,8 @@ exports[`viewMode set to years 1`] = ` data-value={6} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 6 @@ -11897,6 +14086,8 @@ exports[`viewMode set to years 1`] = ` data-value={7} data-year={2017} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 7 @@ -11908,6 +14099,8 @@ exports[`viewMode set to years 1`] = ` className="rdtTimeToggle" colSpan={7} onClick={[Function]} + onKeyDown={[Function]} + tabIndex={0} > 12:00 AM diff --git a/test/tests.spec.js b/test/tests.spec.js index 498afa2ec..80ee215c6 100644 --- a/test/tests.spec.js +++ b/test/tests.spec.js @@ -8,6 +8,7 @@ import _momentTimezone from 'moment-timezone'; // eslint-disable-line import utils from './testUtils'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; +import { callHandler, getKeyboardProps } from '../src/utils'; moment.locale('en'); @@ -1512,7 +1513,7 @@ describe('Imperative methods', function() { expect( utils.isMonthView( component ) ).toBeTruthy(); component.instance().navigate( 'days' ); - + // Sync fix setTimeout( () => { expect( utils.isDayView( component ) ).toBeTruthy(); @@ -1532,3 +1533,23 @@ describe('Imperative methods', function() { }); }); + +describe('Utils', () => { + it('callHandler() - method not provided', () => { + expect(callHandler()).toBe(true); + }); + + it('callHandler() - method provided', () => { + const method = jest.fn((arg) => arg); + expect(callHandler(method, true)).toBe(true); + expect(callHandler(method, false)).toBe(false); + }); + + it('getKeyboardProps()', () => { + const onClickHandler = jest.fn(() => false); + const keyboardProps = getKeyboardProps(onClickHandler); + expect(keyboardProps.tabIndex).toBe(0); + expect(keyboardProps.onKeyDown({})).toBe(true); + expect(keyboardProps.onKeyDown({ key: 'Enter'})).toBe(false); + }); +}); From bbb6dd952c594f45e4be62ae95585261edced9f3 Mon Sep 17 00:00:00 2001 From: Vahissan Nandakumar Date: Mon, 30 Nov 2020 22:16:29 -0500 Subject: [PATCH 2/3] Revert dist files to commit d6e72d27042c0f9201b02348c0e1d76b828f65a1 based on PR checklist --- dist/react-datetime.cjs.js | 2 +- dist/react-datetime.cjs.js.map | 2 +- dist/react-datetime.umd.js | 2 +- dist/react-datetime.umd.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/react-datetime.cjs.js b/dist/react-datetime.cjs.js index c412c03e2..7c4763eb7 100644 --- a/dist/react-datetime.cjs.js +++ b/dist/react-datetime.cjs.js @@ -1,2 +1,2 @@ -module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("moment")},function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=require("react-dom")},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";var r=n(6);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(1),i=n.n(a),s=n(0),c=n.n(s),u=function(e,t){return!e||!1!==e(t)},l=function(e){return{tabIndex:0,onKeyDown:function(t){return"Enter"!==t.key||u(e,t)}}};function p(){return(p=Object.assign||function(e){for(var t=1;t1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t,n=this.props.viewDate,r=n.localeData().monthsShort(n.month(e));return(t=r.substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&T(t.prototype,n),r&&T(t,r),a}(c.a.Component);function L(e,t){return t<4?e[0]:t<8?e[1]:e[2]}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&B(t.prototype,n),r&&B(t,r),a}(c.a.Component);function Q(e,t){return t<3?e[0]:t<7?e[1]:e[2]}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(){return(ee=Object.assign||function(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),fe(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),Ie(xe(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),Ie(xe(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),Ie(xe(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),Ie(xe(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),Ie(xe(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),Ie(xe(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),Ie(xe(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&((9===e.which&&r.props.closeOnTab||"Escape"===e.key)&&r._closeCalendar(),r.isOpen()||"ArrowDown"!==e.key||r._openCalendar())})),Ie(xe(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),Ie(xe(r),"_onPickerKeyDown",(function(e){r.props.input&&"Escape"===e.key&&r._closeCalendar()})),Ie(xe(r),"callHandler",u),r.state=r.getInitialState(),r}return Ee(n,[{key:"render",value:function(){return c.a.createElement(We,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker",onKeyDown:this._onPickerKeyDown},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=Pe(Pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(){return this.props.renderView(this.state.currentView,this._renderCalendar)}},{key:"getInitialState",value:function(){var e=this.props,t=this.getFormat("datetime"),n=this.parseDate(e.value||e.initialValue,t);return this.checkTZ(),{open:!e.input,currentView:e.initialViewMode||this.getInitialView(),viewDate:this.getInitialViewDate(n),selectedDate:n&&n.isValid()?n:void 0,inputValue:this.getInitialInputValue(n)}}},{key:"getInitialViewDate",value:function(e){var t,n=this.props.initialViewDate;if(n){if((t=this.parseDate(n,this.getFormat("datetime")))&&t.isValid())return t;Be('The initialViewDated given "'+n+'" is not valid. Using current date instead.')}else if(e&&e.isValid())return e.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(){var e=this.getFormat("date");return e?this.getUpdateOn(e):Le}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ye:-1!==e.indexOf("M")?Me:-1!==e.indexOf("Y")?Re:Ye}},{key:"getLocaleData",value:function(){var e=this.props;return this.localMoment(e.value||e.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(){var e=this.getLocaleData(),t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(){var e=this.getLocaleData(),t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat();if("time"===e)return this.getTimeFormat();var t=this.getDateFormat(),n=this.getTimeFormat();return t&&n?t+" "+n:t||n}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||i.a.tz||(this.tzWarning=!0,Be('displayTimeZone prop with value "'+e+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ()}}},{key:"regenerateDates",value:function(){var e=this.props,t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e){var t=this.props;return t.inputProps.value?t.inputProps.value:e&&e.isValid()?e.format(this.getFormat("datetime")):t.value&&"string"==typeof t.value?t.value:t.initialValue&&"string"==typeof t.initialValue?t.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}}]),n}(c.a.Component);function Be(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}Ie(Ze,"propTypes",{value:Ue,initialValue:Ue,initialViewDate:Ue,initialViewMode:Ae.oneOf([Re,Me,Ye,Le]),onOpen:Ae.func,onClose:Ae.func,onChange:Ae.func,onNavigate:Ae.func,onBeforeNavigate:Ae.func,onNavigateBack:Ae.func,onNavigateForward:Ae.func,updateOnView:Ae.string,locale:Ae.string,utc:Ae.bool,displayTimeZone:Ae.string,input:Ae.bool,dateFormat:Ae.oneOfType([Ae.string,Ae.bool]),timeFormat:Ae.oneOfType([Ae.string,Ae.bool]),inputProps:Ae.object,timeConstraints:Ae.object,isValidDate:Ae.func,open:Ae.bool,strictParsing:Ae.bool,closeOnSelect:Ae.bool,closeOnTab:Ae.bool,renderView:Ae.func,renderInput:Ae.func,renderDay:Ae.func,renderMonth:Ae.func,renderYear:Ae.func}),Ie(Ze,"defaultProps",{onOpen:He,onClose:He,onCalendarOpen:He,onCalendarClose:He,onChange:He,onNavigate:He,onBeforeNavigate:function(e){return e},onNavigateBack:He,onNavigateForward:He,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0,renderView:function(e,t){return t()}}),Ie(Ze,"moment",i.a);var We=De(function(e){Se(n,e);var t=Te(n);function n(){var e;_e(this,n);for(var r=arguments.length,o=new Array(r),a=0;a1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t=this.props.viewDate,n=t.localeData().monthsShort(t.month(e));return this.capitalize(n.substring(0,3))}}])&&D(t.prototype,n),r&&D(t,r),a}(c.a.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&x(t.prototype,n),r&&x(t,r),a}(c.a.Component);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),this.pad(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),we(ge(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),we(ge(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),we(ge(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),we(ge(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),we(ge(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),we(ge(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),we(ge(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),we(ge(r),"_onInputClick",(function(e){console.log("CLICKING 2!"),r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(e),r}return he(n,[{key:"render",value:function(){return c.a.createElement(Ve,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker"},this.renderView(this.state.currentView,this._renderCalendar)))}},{key:"renderInput",value:function(){if(this.props.input){var e=pe(pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(e,t){return this.props.renderView?this.props.renderView(e,(function(){return t(e)})):t(this.state.currentView)}},{key:"getInitialState",value:function(e){var t=e||this.props,n=this.getFormat("datetime"),r=this.parseDate(t.value||t.initialValue,n);return this.checkTZ(t),{open:!t.input,currentView:t.initialViewMode||this.getInitialView(this.getFormat("date")),viewDate:this.getInitialViewDate(t.initialViewDate,r,n),selectedDate:r&&r.isValid()?r:void 0,inputValue:this.getInitialInputValue(t,r,n)}}},{key:"getInitialViewDate",value:function(e,t,n){var r;if(e){if((r=this.parseDate(e,n))&&r.isValid())return r;this.log('The initialViewDated given "'+e+'" is not valid. Using current date instead.')}else if(t&&t.isValid())return t.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(e){return e?this.getUpdateOn(e):_e}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ce:-1!==e.indexOf("M")?De:-1!==e.indexOf("Y")?ke:Ce}},{key:"getLocaleData",value:function(e){var t=e||this.props;return this.localMoment(t.value||t.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(e){var t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(e){var t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat(this.getLocaleData());if("time"===e)return this.getTimeFormat(this.getLocaleData());var t=this.getLocaleData(),n=this.getDateFormat(t),r=this.getTimeFormat(t);return n&&r?n+" "+r:n||r}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(e){!e.displayTimeZone||this.tzWarning||i.a.tz||(this.tzWarning=!0,this.log('displayTimeZone prop with value "'+e.displayTimeZone+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(this.props),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ(this.props)}}},{key:"regenerateDates",value:function(e){var t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e,t,n){return e.inputProps.value?e.inputProps.value:t&&t.isValid()?t.format(n):e.value&&"string"==typeof e.value?e.value:e.initialValue&&"string"==typeof e.initialValue?e.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}},{key:"log",value:function(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c.a.Component);we(je,"propTypes",{value:Se,initialValue:Se,initialViewDate:Se,initialViewMode:Ee.oneOf([ke,De,Ce,_e]),onOpen:Ee.func,onClose:Ee.func,onChange:Ee.func,onNavigate:Ee.func,onBeforeNavigate:Ee.func,onNavigateBack:Ee.func,onNavigateForward:Ee.func,updateOnView:Ee.string,locale:Ee.string,utc:Ee.bool,displayTimeZone:Ee.string,input:Ee.bool,dateFormat:Ee.oneOfType([Ee.string,Ee.bool]),timeFormat:Ee.oneOfType([Ee.string,Ee.bool]),inputProps:Ee.object,timeConstraints:Ee.object,isValidDate:Ee.func,open:Ee.bool,strictParsing:Ee.bool,closeOnSelect:Ee.bool,closeOnTab:Ee.bool,renderView:Ee.func,renderInput:Ee.func,renderDay:Ee.func,renderMonth:Ee.func,renderYear:Ee.func}),we(je,"defaultProps",{onOpen:Pe,onClose:Pe,onCalendarOpen:Pe,onCalendarClose:Pe,onChange:Pe,onNavigate:Pe,onBeforeNavigate:function(e){return e},onNavigateBack:Pe,onNavigateForward:Pe,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0}),we(je,"moment",i.a);var Ve=ce(function(e){me(n,e);var t=ve(n);function n(){var e;fe(this,n);for(var r=arguments.length,o=new Array(r),a=0;a {\n\tif (!method) return true;\n\treturn method(e) !== false;\n};\n\nexport const getKeyboardProps = (onClickHandler) => ({\n\ttabIndex: 0,\n\tonKeyDown: (e) => e.key !== 'Enter' || callHandler(onClickHandler, e),\n});\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true,\n\t\trenderDay: ( props, date ) => { date.date() },\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\t{ this.renderDayHeaders() }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays() }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders() {\n\t\tconst locale = this.props.viewDate.localeData();\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays() {\n\t\tconst date = this.props.viewDate;\n\t\tconst startOfMonth = date.clone().startOf('month');\n\t\tconst endOfMonth = date.clone().endOf('month');\n\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t\tdayProps = { ...getKeyboardProps(dayProps.onClick), ...dayProps };\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\treturn this.props.renderDay(\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t);\n\t}\n\n\trenderFooter() {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\tconst date = this.props.viewDate;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onFooterClick = () => {\n\t\tthis.props.showView('time');\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n}\n\nfunction getRow( rows, day ) {\n\treturn rows[ Math.floor( day / 7 ) ];\n}\n\n/**\n * Get a list of the days of the week\n * depending on the current locale\n * @return {array} A list with the shortname of the days\n */\nfunction getDaysOfWeek( locale ) {\n\tconst first = locale.firstDayOfWeek();\n\tlet dow = [];\n\tlet i = 0;\n\n\tlocale._weekdaysMin.forEach(function (day) {\n\t\tdow[(7 + (i++) - first) % 7] = day;\n\t});\n\n\treturn dow;\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths() {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = getRow( rows, month );\n\n\t\t\trow.push( this.renderMonth( month ) );\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month ) {\n\t\tconst selectedDate = this.props.selectedDate;\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: month,\n\t\t\tclassName,\n\t\t\t'data-value': month,\n\t\t\tonClick\n\t\t};\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\t\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 4 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 8 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n\nfunction capitalize( str ) {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class YearsView extends React.Component {\n\tstatic defaultProps = {\n\t\trenderYear: ( props, year ) => { year },\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst viewYear = this.getViewYear();\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears() {\n\t\tconst viewYear = this.getViewYear();\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year ) {\n\t\tconst selectedYear = this.getSelectedYear();\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: year,\n\t\t\tclassName,\n\t\t\t'data-value': year,\n\t\t\tonClick\n\t\t};\n\n\t\treturn this.props.renderYear(\n\t\t\tprops,\n\t\t\tyear,\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t);\n\t}\n\n\tgetViewYear() {\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\t}\n\n\tgetSelectedYear() {\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 3 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 7 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nfunction createConstraints( overrideTimeConstraints ) {\n\tlet constraints = {};\n\n\tObject.keys( timeConstraints ).forEach( type => {\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\n\t});\n\n\treturn constraints;\n}\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = createConstraints( props.timeConstraints );\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\tconst increaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'increase', type);\n\t\t};\n\n\t\tconst decreaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'decrease', type);\n\t\t};\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
{ value }
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onHeaderClick = () => {\n\t\tthis.props.showView('days');\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\t\t\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\t// keydown event auto repeats\n\t\tif (e.type === 'keydown') return;\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn pad( type, value );\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: pad( 'hours', hours ),\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n\nfunction pad( type, value ) {\n\tconst padValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t};\n\n\tlet str = value + '';\n\twhile ( str.length < padValues[ type ] )\n\t\tstr = '0' + str;\n\treturn str;\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './views/DaysView';\nimport MonthsView from './views/MonthsView';\nimport YearsView from './views/YearsView';\nimport TimeView from './views/TimeView';\nimport onClickOutside from 'react-onclickoutside';\nimport { callHandler } from './utils';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true,\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView() {\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\n\t}\n\n\t_renderCalendar = () => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( state.currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState() {\n\t\tlet props = this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ();\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( selectedDate ) {\n\t\tconst propDate = this.props.initialViewDate;\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView() {\n\t\tconst dateFormat = this.getFormat( 'date' );\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData() {\n\t\tlet p = this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat();\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat();\n\t\t}\n\t\t\n\t\tlet dateFormat = this.getDateFormat();\n\t\tlet timeFormat = this.getTimeFormat();\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ() {\n\t\tconst { displayTimeZone } = this.props;\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates();\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ();\n\t}\n\n\tregenerateDates() {\n\t\tconst props = this.props;\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( selectedDate ) {\n\t\tconst props = this.props;\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( (e.which === 9 && this.props.closeOnTab) || e.key === 'Escape' ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\n\t\tif ( !this.isOpen() && e.key === 'ArrowDown' ) {\n\t\t\tthis._openCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onPickerKeyDown = (e) => {\n\t\tif (this.props.input && e.key === 'Escape') {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tcallHandler = callHandler\n}\n\nfunction log( message, method ) {\n\tlet con = typeof window !== 'undefined' && window.console;\n\tif ( !con ) return;\n\n\tif ( !method ) {\n\t\tmethod = 'warn';\n\t}\n\tcon[ method ]( '***react-datetime:' + message );\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Datetime/webpack/bootstrap","webpack://Datetime/external \"react\"","webpack://Datetime/external \"moment\"","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/external \"react-dom\"","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/./src/datetime/ViewNavigation.js","webpack://Datetime/./src/datetime/DaysView.js","webpack://Datetime/./src/datetime/MonthsView.js","webpack://Datetime/./src/datetime/YearsView.js","webpack://Datetime/./src/datetime/TimeView.js","webpack://Datetime/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://Datetime/./src/datetime/DateTime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","e","updateDate","date","this","viewDate","locale","localeData","startOfMonth","clone","startOf","endOfMonth","endOf","renderNavigation","renderDayHeaders","renderDays","renderFooter","navigate","showView","months","year","month","dayItems","getDaysOfWeek","map","day","index","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","first","firstDayOfWeek","dow","_weekdaysMin","forEach","Math","floor","React","Component","MonthsView","event","renderMonths","viewYear","renderMonth","isDisabledMonth","_updateSelectedMonth","getMonthText","str","charAt","toUpperCase","slice","set","localMoment","monthStr","monthsShort","capitalize","substring","YearsView","parseInt","renderYears","selectedYear","renderYear","years","isDisabledYear","_updateSelectedYear","cache","disabledYearsCache","undefined","dayOfYear","timeConstraints","hours","min","max","step","minutes","seconds","milliseconds","TimeView","constraints","createConstraints","state","getTimeParts","keys","type","items","timeParts","getCounters","renderCounter","renderHeader","isAMPM","indexOf","onMouseDown","onStartClicking","dateFormat","action","button","toggleDayPart","update","body","document","setState","timer","setTimeout","increaseTimer","setInterval","mouseUpListener","clearTimeout","clearInterval","setTime","removeEventListener","addEventListener","tc","pad","length","padValues","counters","toLowerCase","ampm","prevProps","isNodeFound","current","componentNode","ignoreClass","correspondingElement","classList","contains","seed","passiveEventSupport","uid","handlersMap","enabledInstances","touchEvents","getEventHandlerOptions","instance","eventName","handlerOptions","passive","preventDefault","WrappedComponent","config","_class","_temp","displayName","_Component","subClass","superClass","onClickOutside","_this","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","__getComponentNode","setClickOutsideRef","enableOnClickOutside","_uid","window","options","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","target","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","ref","instanceRef","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","defaultProps","getClass","viewModes","TYPES","nofn","datetype","Date","Datetime","currentView","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","getFormat","_setTime","view","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","callHandler","inputProps","onFocus","_openCalendar","isValid","onKeyDown","which","closeOnTab","console","log","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","renderView","_renderCalendar","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","renderer","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","initialViewDate","getInitialInputValue","propDate","getInitialDate","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","defaultValue","longDateFormat","getDateFormat","getLocaleData","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tz","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","me","logError","message","method","con","onCalendarOpen","onCalendarClose","next","createRef","container","children"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EA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O,KAAK5C,MAAMqC,UAAYoM,IAAM7L,KAAKiU,WAChDjU,KAAK5C,MAAM8W,Y,yCAIGrU,GAClBG,KAAK5C,MAAMiT,WAAYxQ,K,2CAIvB,OAAOG,KAAKiU,UAAU7L,Y,GAfGnF,IAAMC","file":"react-datetime.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = require(\"react\");","module.exports = require(\"moment\");","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = require(\"react-dom\");","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import React from 'react';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true\n\t}\n\n\trender() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\n\t\tlet startOfMonth = date.clone().startOf('month');\n\t\tlet endOfMonth = date.clone().endOf('month');\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( date, locale ) }\n\t\t\t\t\t\t{ this.renderDayHeaders( locale ) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays( date, startOfMonth, endOfMonth ) }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter( date ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( date, locale ) {\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders( locale ) {\n\t\tlet dayItems = this.getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays( date, startOfMonth, endOfMonth ) {\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = this.getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\tif ( this.props.renderDay ) {\n\t\t\treturn this.props.renderDay(\n\t\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t{ date.date() }\n\t\t);\n\t}\n\n\trenderFooter( date ) {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('time') }\n\t\t\t\t\t\tcolSpan={7}\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n\n\t/**\n\t * Get a list of the days of the week\n\t * depending on the current locale\n\t * @return {array} A list with the shortname of the days\n\t */\n\tgetDaysOfWeek(locale) {\n\t\tconst first = locale.firstDayOfWeek();\n\t\tlet dow = [];\n\t\tlet i = 0;\n\n\t\tlocale._weekdaysMin.forEach(function (day) {\n\t\t\tdow[(7 + (i++) - first) % 7] = day;\n\t\t});\n\n\t\treturn dow;\n\t}\n\n\tgetRow( rows, day ) {\n\t\treturn rows[ Math.floor( day / 7 ) ];\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths( viewYear ) {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = this.getRow( rows, month );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderMonth( month, this.props.selectedDate )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month, selectedDate ) {\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 4 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 8 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tcapitalize( str ) {\n\t\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n\t}\n\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn this.capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class YearsView extends React.Component {\n\trender() {\n\t\tconst viewYear = parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( viewYear ) {\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears( viewYear ) {\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tlet selectedYear = this.props.selectedDate && this.props.selectedDate.year();\n\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = this.getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year, selectedYear )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year, selectedYear ) {\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\n\n\t\tif ( this.props.renderYear ) {\n\t\t\treturn this.props.renderYear(\n\t\t\t\tprops,\n\t\t\t\tyear,\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ year }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 3 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 7 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = this.createConstraints(props);\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\tcreateConstraints( props ) {\n\t\tlet constraints = {};\n\n\t\tObject.keys( timeConstraints ).forEach( type => {\n\t\t\tconstraints[ type ] = { ...timeConstraints[type], ...(props.timeConstraints[type] || {}) };\n\t\t});\n\n\t\treturn constraints;\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\n\t\t\t\t
{ value }
\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('days') }>\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\tpadValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn this.pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn this.pad( type, value );\n\t}\n\n\tpad( type, value ) {\n\t\tlet str = value + '';\n\t\twhile ( str.length < this.padValues[ type ] )\n\t\t\tstr = '0' + str;\n\t\treturn str;\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: this.pad( 'hours', hours ),\n\t\t\tminutes: this.pad( 'minutes', date.minutes() ),\n\t\t\tseconds: this.pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: this.pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './DaysView';\nimport MonthsView from './MonthsView';\nimport YearsView from './YearsView';\nimport TimeView from './TimeView';\nimport onClickOutside from 'react-onclickoutside';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState( props );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView( this.state.currentView, this._renderCalendar ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView( currentView, renderer ) {\n\t\tif ( this.props.renderView ) {\n\t\t\treturn this.props.renderView( currentView, () => renderer(currentView) );\n\t\t}\n\t\treturn renderer( this.state.currentView );\n\t}\n\n\t_renderCalendar = currentView => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState( p ) {\n\t\tlet props = p || this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ( props );\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView( this.getFormat('date') ),\n\t\t\tviewDate: this.getInitialViewDate( props.initialViewDate, selectedDate, inputFormat ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( props, selectedDate, inputFormat )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( propDate, selectedDate, format ) {\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, format );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.log('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView( dateFormat ) {\n\t\tif ( !dateFormat ) return viewModes.TIME;\n\t\treturn this.getUpdateOn( dateFormat );\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData( props ) {\n\t\tlet p = props || this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat( locale ) {\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat( locale ) {\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat( this.getLocaleData() );\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat( this.getLocaleData() );\n\t\t}\n\t\t\n\t\tlet locale = this.getLocaleData();\n\t\tlet dateFormat = this.getDateFormat( locale );\n\t\tlet timeFormat = this.getTimeFormat( locale );\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ( props ) {\n\t\tif ( props.displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tthis.log('displayTimeZone prop with value \"' + props.displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates( this.props );\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ( this.props );\n\t}\n\n\tregenerateDates(props) {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( props, selectedDate, inputFormat ) {\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( inputFormat );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\tlog( message, method ) {\n\t\tlet con = typeof window !== 'undefined' && window.console;\n\t\tif ( !con ) return;\n\n\t\tif ( !method ) {\n\t\t\tmethod = 'warn';\n\t\t}\n\t\tcon[ method ]( '***react-datetime:' + message );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tconsole.log('CLICKING 2!');\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\tcallHandler( method, e ) {\n\t\tif ( !method ) return true;\n\t\treturn method(e) !== false;\n\t}\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-datetime.umd.js b/dist/react-datetime.umd.js index 7f8ac8f70..53422efc6 100644 --- a/dist/react-datetime.umd.js +++ b/dist/react-datetime.umd.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("moment"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","moment","react-dom"],t):"object"==typeof exports?exports.Datetime=t(require("react"),require("moment"),require("react-dom")):e.Datetime=t(e.react,e.moment,e["react-dom"])}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=n},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";var r=n(6);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(1),i=n.n(a),c=n(0),s=n.n(c),u=function(e,t){return!e||!1!==e(t)},l=function(e){return{tabIndex:0,onKeyDown:function(t){return"Enter"!==t.key||u(e,t)}}};function p(){return(p=Object.assign||function(e){for(var t=1;t1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t,n=this.props.viewDate,r=n.localeData().monthsShort(n.month(e));return(t=r.substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&T(t.prototype,n),r&&T(t,r),a}(s.a.Component);function L(e,t){return t<4?e[0]:t<8?e[1]:e[2]}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&B(t.prototype,n),r&&B(t,r),a}(s.a.Component);function Q(e,t){return t<3?e[0]:t<7?e[1]:e[2]}function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(){return(ee=Object.assign||function(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),fe(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(c.createElement)(e,n)},i}(c.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),Ie(xe(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),Ie(xe(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),Ie(xe(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),Ie(xe(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),Ie(xe(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),Ie(xe(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),Ie(xe(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&((9===e.which&&r.props.closeOnTab||"Escape"===e.key)&&r._closeCalendar(),r.isOpen()||"ArrowDown"!==e.key||r._openCalendar())})),Ie(xe(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),Ie(xe(r),"_onPickerKeyDown",(function(e){r.props.input&&"Escape"===e.key&&r._closeCalendar()})),Ie(xe(r),"callHandler",u),r.state=r.getInitialState(),r}return Ee(n,[{key:"render",value:function(){return s.a.createElement(We,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),s.a.createElement("div",{className:"rdtPicker",onKeyDown:this._onPickerKeyDown},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=Pe(Pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?s.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):s.a.createElement("input",e)}}},{key:"renderView",value:function(){return this.props.renderView(this.state.currentView,this._renderCalendar)}},{key:"getInitialState",value:function(){var e=this.props,t=this.getFormat("datetime"),n=this.parseDate(e.value||e.initialValue,t);return this.checkTZ(),{open:!e.input,currentView:e.initialViewMode||this.getInitialView(),viewDate:this.getInitialViewDate(n),selectedDate:n&&n.isValid()?n:void 0,inputValue:this.getInitialInputValue(n)}}},{key:"getInitialViewDate",value:function(e){var t,n=this.props.initialViewDate;if(n){if((t=this.parseDate(n,this.getFormat("datetime")))&&t.isValid())return t;Be('The initialViewDated given "'+n+'" is not valid. Using current date instead.')}else if(e&&e.isValid())return e.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(){var e=this.getFormat("date");return e?this.getUpdateOn(e):Le}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ye:-1!==e.indexOf("M")?Me:-1!==e.indexOf("Y")?Re:Ye}},{key:"getLocaleData",value:function(){var e=this.props;return this.localMoment(e.value||e.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(){var e=this.getLocaleData(),t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(){var e=this.getLocaleData(),t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat();if("time"===e)return this.getTimeFormat();var t=this.getDateFormat(),n=this.getTimeFormat();return t&&n?t+" "+n:t||n}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||i.a.tz||(this.tzWarning=!0,Be('displayTimeZone prop with value "'+e+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ()}}},{key:"regenerateDates",value:function(){var e=this.props,t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e){var t=this.props;return t.inputProps.value?t.inputProps.value:e&&e.isValid()?e.format(this.getFormat("datetime")):t.value&&"string"==typeof t.value?t.value:t.initialValue&&"string"==typeof t.initialValue?t.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}}]),n}(s.a.Component);function Be(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}Ie(Ze,"propTypes",{value:Ue,initialValue:Ue,initialViewDate:Ue,initialViewMode:Ae.oneOf([Re,Me,Ye,Le]),onOpen:Ae.func,onClose:Ae.func,onChange:Ae.func,onNavigate:Ae.func,onBeforeNavigate:Ae.func,onNavigateBack:Ae.func,onNavigateForward:Ae.func,updateOnView:Ae.string,locale:Ae.string,utc:Ae.bool,displayTimeZone:Ae.string,input:Ae.bool,dateFormat:Ae.oneOfType([Ae.string,Ae.bool]),timeFormat:Ae.oneOfType([Ae.string,Ae.bool]),inputProps:Ae.object,timeConstraints:Ae.object,isValidDate:Ae.func,open:Ae.bool,strictParsing:Ae.bool,closeOnSelect:Ae.bool,closeOnTab:Ae.bool,renderView:Ae.func,renderInput:Ae.func,renderDay:Ae.func,renderMonth:Ae.func,renderYear:Ae.func}),Ie(Ze,"defaultProps",{onOpen:He,onClose:He,onCalendarOpen:He,onCalendarClose:He,onChange:He,onNavigate:He,onBeforeNavigate:function(e){return e},onNavigateBack:He,onNavigateForward:He,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0,renderView:function(e,t){return t()}}),Ie(Ze,"moment",i.a);var We=De(function(e){Se(n,e);var t=Te(n);function n(){var e;_e(this,n);for(var r=arguments.length,o=new Array(r),a=0;a1;)if(t(n.date(r)))return!1;return!0}},{key:"getMonthText",value:function(e){var t=this.props.viewDate,n=t.localeData().monthsShort(t.month(e));return this.capitalize(n.substring(0,3))}}])&&k(t.prototype,n),r&&k(t,r),a}(c.a.Component);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n1;)if(n(r.dayOfYear(o)))return t[e]=!1,!1;return t[e]=!0,!0}}])&&x(t.prototype,n),r&&x(t,r),a}(c.a.Component);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t=12?e-=12:e+=12,this.props.setTime("hours",e)}},{key:"increase",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)+t.step;return n>t.max&&(n=t.min+(n-(t.max+1))),this.pad(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(s.createElement)(e,n)},i}(s.Component),n.displayName="OnClickOutside("+o+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r};function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),we(ge(r),"_setTime",(function(e,t){var n=(r.getSelectedDate()||r.state.viewDate).clone();n[e](t),r.props.value||r.setState({selectedDate:n,viewDate:n.clone(),inputValue:n.format(r.getFormat("datetime"))}),r.props.onChange(n)})),we(ge(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),we(ge(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),we(ge(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),we(ge(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),we(ge(r),"_onInputChange",(function(e){if(r.callHandler(r.props.inputProps.onChange,e)){var t=e.target?e.target.value:e,n=r.localMoment(t,r.getFormat("datetime")),o={inputValue:t};n.isValid()?(o.selectedDate=n,o.viewDate=n.clone().startOf("month")):o.selectedDate=null,r.setState(o,(function(){r.props.onChange(n.isValid()?n:r.state.inputValue)}))}})),we(ge(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),we(ge(r),"_onInputClick",(function(e){console.log("CLICKING 2!"),r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(e),r}return he(n,[{key:"render",value:function(){return c.a.createElement(Ve,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c.a.createElement("div",{className:"rdtPicker"},this.renderView(this.state.currentView,this._renderCalendar)))}},{key:"renderInput",value:function(){if(this.props.input){var e=pe(pe({type:"text",className:"form-control",value:this.getInputValue()},this.props.inputProps),{},{onFocus:this._onInputFocus,onChange:this._onInputChange,onKeyDown:this._onInputKeyDown,onClick:this._onInputClick});return this.props.renderInput?c.a.createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c.a.createElement("input",e)}}},{key:"renderView",value:function(e,t){return this.props.renderView?this.props.renderView(e,(function(){return t(e)})):t(this.state.currentView)}},{key:"getInitialState",value:function(e){var t=e||this.props,n=this.getFormat("datetime"),r=this.parseDate(t.value||t.initialValue,n);return this.checkTZ(t),{open:!t.input,currentView:t.initialViewMode||this.getInitialView(this.getFormat("date")),viewDate:this.getInitialViewDate(t.initialViewDate,r,n),selectedDate:r&&r.isValid()?r:void 0,inputValue:this.getInitialInputValue(t,r,n)}}},{key:"getInitialViewDate",value:function(e,t,n){var r;if(e){if((r=this.parseDate(e,n))&&r.isValid())return r;this.log('The initialViewDated given "'+e+'" is not valid. Using current date instead.')}else if(t&&t.isValid())return t.clone();return this.getInitialDate()}},{key:"getInitialDate",value:function(){var e=this.localMoment();return e.hour(0).minute(0).second(0).millisecond(0),e}},{key:"getInitialView",value:function(e){return e?this.getUpdateOn(e):_e}},{key:"parseDate",value:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n}},{key:"getClassName",value:function(){var e="rdt",t=this.props,n=t.className;return Array.isArray(n)?e+=" "+n.join(" "):n&&(e+=" "+n),t.input||(e+=" rdtStatic"),this.isOpen()&&(e+=" rdtOpen"),e}},{key:"isOpen",value:function(){return!this.props.input||(void 0===this.props.open?this.state.open:this.props.open)}},{key:"getUpdateOn",value:function(e){return this.props.updateOnView?this.props.updateOnView:e.match(/[lLD]/)?Ce:-1!==e.indexOf("M")?ke:-1!==e.indexOf("Y")?De:Ce}},{key:"getLocaleData",value:function(e){var t=e||this.props;return this.localMoment(t.value||t.defaultValue||new Date).localeData()}},{key:"getDateFormat",value:function(e){var t=this.props.dateFormat;return!0===t?e.longDateFormat("L"):t||""}},{key:"getTimeFormat",value:function(e){var t=this.props.timeFormat;return!0===t?e.longDateFormat("LT"):t||""}},{key:"getFormat",value:function(e){if("date"===e)return this.getDateFormat(this.getLocaleData());if("time"===e)return this.getTimeFormat(this.getLocaleData());var t=this.getLocaleData(),n=this.getDateFormat(t),r=this.getTimeFormat(t);return n&&r?n+" "+r:n||r}},{key:"updateTime",value:function(e,t,n,r){var o={},a=r?"selectedDate":"viewDate";o[a]=this.state[a].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?i.a.utc(e,t,n.strictParsing):n.displayTimeZone?i.a.tz(e,t,n.displayTimeZone):i()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(e){!e.displayTimeZone||this.tzWarning||i.a.tz||(this.tzWarning=!0,this.log('displayTimeZone prop with value "'+e.displayTimeZone+'" is used but moment.js timezone is not loaded.',"error"))}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=!1,n=this.props;["locale","utc","displayZone","dateFormat","timeFormat"].forEach((function(r){e[r]!==n[r]&&(t=!0)})),t&&this.regenerateDates(this.props),n.value&&n.value!==e.value&&this.setViewDate(n.value),this.checkTZ(this.props)}}},{key:"regenerateDates",value:function(e){var t=this.state.viewDate.clone(),n=this.state.selectedDate&&this.state.selectedDate.clone();e.locale&&(t.locale(e.locale),n&&n.locale(e.locale)),e.utc?(t.utc(),n&&n.utc()):e.displayTimeZone?(t.tz(e.displayTimeZone),n&&n.tz(e.displayTimeZone)):(t.locale(),n&&n.locale());var r={viewDate:t,selectedDate:n};n&&n.isValid()&&(r.inputValue=n.format(this.getFormat("datetime"))),this.setState(r)}},{key:"getSelectedDate",value:function(){if(void 0===this.props.value)return this.state.selectedDate;var e=this.parseDate(this.props.value,this.getFormat("datetime"));return!(!e||!e.isValid())&&e}},{key:"getInitialInputValue",value:function(e,t,n){return e.inputProps.value?e.inputProps.value:t&&t.isValid()?t.format(n):e.value&&"string"==typeof e.value?e.value:e.initialValue&&"string"==typeof e.initialValue?e.initialValue:""}},{key:"getInputValue",value:function(){var e=this.getSelectedDate();return e?e.format(this.getFormat("datetime")):this.state.inputValue}},{key:"setViewDate",value:function(e){var t,n=this,r=function(){return n.log("Invalid date passed to the `setViewDate` method: "+e)};return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):r()}},{key:"navigate",value:function(e){this._showView(e)}},{key:"log",value:function(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c.a.Component);we(je,"propTypes",{value:Se,initialValue:Se,initialViewDate:Se,initialViewMode:Ee.oneOf([De,ke,Ce,_e]),onOpen:Ee.func,onClose:Ee.func,onChange:Ee.func,onNavigate:Ee.func,onBeforeNavigate:Ee.func,onNavigateBack:Ee.func,onNavigateForward:Ee.func,updateOnView:Ee.string,locale:Ee.string,utc:Ee.bool,displayTimeZone:Ee.string,input:Ee.bool,dateFormat:Ee.oneOfType([Ee.string,Ee.bool]),timeFormat:Ee.oneOfType([Ee.string,Ee.bool]),inputProps:Ee.object,timeConstraints:Ee.object,isValidDate:Ee.func,open:Ee.bool,strictParsing:Ee.bool,closeOnSelect:Ee.bool,closeOnTab:Ee.bool,renderView:Ee.func,renderInput:Ee.func,renderDay:Ee.func,renderMonth:Ee.func,renderYear:Ee.func}),we(je,"defaultProps",{onOpen:Pe,onClose:Pe,onCalendarOpen:Pe,onCalendarClose:Pe,onChange:Pe,onNavigate:Pe,onBeforeNavigate:function(e){return e},onNavigateBack:Pe,onNavigateForward:Pe,dateFormat:!0,timeFormat:!0,utc:!1,className:"",input:!0,inputProps:{},timeConstraints:{},isValidDate:function(){return!0},strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,closeOnClickOutside:!0}),we(je,"moment",i.a);var Ve=ce(function(e){me(n,e);var t=ve(n);function n(){var e;fe(this,n);for(var r=arguments.length,o=new Array(r),a=0;a {\n\tif (!method) return true;\n\treturn method(e) !== false;\n};\n\nexport const getKeyboardProps = (onClickHandler) => ({\n\ttabIndex: 0,\n\tonKeyDown: (e) => e.key !== 'Enter' || callHandler(onClickHandler, e),\n});\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true,\n\t\trenderDay: ( props, date ) => { date.date() },\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\t{ this.renderDayHeaders() }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays() }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders() {\n\t\tconst locale = this.props.viewDate.localeData();\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays() {\n\t\tconst date = this.props.viewDate;\n\t\tconst startOfMonth = date.clone().startOf('month');\n\t\tconst endOfMonth = date.clone().endOf('month');\n\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t\tdayProps = { ...getKeyboardProps(dayProps.onClick), ...dayProps };\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\treturn this.props.renderDay(\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t);\n\t}\n\n\trenderFooter() {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\tconst date = this.props.viewDate;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onFooterClick = () => {\n\t\tthis.props.showView('time');\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n}\n\nfunction getRow( rows, day ) {\n\treturn rows[ Math.floor( day / 7 ) ];\n}\n\n/**\n * Get a list of the days of the week\n * depending on the current locale\n * @return {array} A list with the shortname of the days\n */\nfunction getDaysOfWeek( locale ) {\n\tconst first = locale.firstDayOfWeek();\n\tlet dow = [];\n\tlet i = 0;\n\n\tlocale._weekdaysMin.forEach(function (day) {\n\t\tdow[(7 + (i++) - first) % 7] = day;\n\t});\n\n\treturn dow;\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths() {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = getRow( rows, month );\n\n\t\t\trow.push( this.renderMonth( month ) );\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month ) {\n\t\tconst selectedDate = this.props.selectedDate;\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: month,\n\t\t\tclassName,\n\t\t\t'data-value': month,\n\t\t\tonClick\n\t\t};\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\t\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 4 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 8 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n\nfunction capitalize( str ) {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n}\n","import React from 'react';\nimport ViewNavigation from '../parts/ViewNavigation';\nimport { getKeyboardProps } from '../utils';\n\nexport default class YearsView extends React.Component {\n\tstatic defaultProps = {\n\t\trenderYear: ( props, year ) => { year },\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tconst viewYear = this.getViewYear();\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears() {\n\t\tconst viewYear = this.getViewYear();\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year ) {\n\t\tconst selectedYear = this.getSelectedYear();\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\t\tlet keyboardProps = {};\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t\tkeyboardProps = getKeyboardProps(onClick);\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {\n\t\t\t...keyboardProps,\n\t\t\tkey: year,\n\t\t\tclassName,\n\t\t\t'data-value': year,\n\t\t\tonClick\n\t\t};\n\n\t\treturn this.props.renderYear(\n\t\t\tprops,\n\t\t\tyear,\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t);\n\t}\n\n\tgetViewYear() {\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\t}\n\n\tgetSelectedYear() {\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n\nfunction getRow( rows, year ) {\n\tif ( year < 3 ) {\n\t\treturn rows[0];\n\t}\n\tif ( year < 7 ) {\n\t\treturn rows[1];\n\t}\n\n\treturn rows[2];\n}\n","import React from 'react';\nimport { getKeyboardProps } from '../utils';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nfunction createConstraints( overrideTimeConstraints ) {\n\tlet constraints = {};\n\n\tObject.keys( timeConstraints ).forEach( type => {\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\n\t});\n\n\treturn constraints;\n}\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = createConstraints( props.timeConstraints );\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\tconst increaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'increase', type);\n\t\t};\n\n\t\tconst decreaseCounter = (e) => {\n\t\t\tthis.onStartClicking(e, 'decrease', type);\n\t\t};\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
{ value }
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_onHeaderClick = () => {\n\t\tthis.props.showView('days');\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\t\t\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\t// keydown event auto repeats\n\t\tif (e.type === 'keydown') return;\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn pad( type, value );\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: pad( 'hours', hours ),\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n\nfunction pad( type, value ) {\n\tconst padValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t};\n\n\tlet str = value + '';\n\twhile ( str.length < padValues[ type ] )\n\t\tstr = '0' + str;\n\treturn str;\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './views/DaysView';\nimport MonthsView from './views/MonthsView';\nimport YearsView from './views/YearsView';\nimport TimeView from './views/TimeView';\nimport onClickOutside from 'react-onclickoutside';\nimport { callHandler } from './utils';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true,\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView() }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView() {\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\n\t}\n\n\t_renderCalendar = () => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( state.currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState() {\n\t\tlet props = this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ();\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( selectedDate ) {\n\t\tconst propDate = this.props.initialViewDate;\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView() {\n\t\tconst dateFormat = this.getFormat( 'date' );\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData() {\n\t\tlet p = this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat() {\n\t\tconst locale = this.getLocaleData();\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat();\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat();\n\t\t}\n\t\t\n\t\tlet dateFormat = this.getDateFormat();\n\t\tlet timeFormat = this.getTimeFormat();\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ() {\n\t\tconst { displayTimeZone } = this.props;\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates();\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ();\n\t}\n\n\tregenerateDates() {\n\t\tconst props = this.props;\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( selectedDate ) {\n\t\tconst props = this.props;\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( (e.which === 9 && this.props.closeOnTab) || e.key === 'Escape' ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\n\t\tif ( !this.isOpen() && e.key === 'ArrowDown' ) {\n\t\t\tthis._openCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onPickerKeyDown = (e) => {\n\t\tif (this.props.input && e.key === 'Escape') {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tcallHandler = callHandler\n}\n\nfunction log( message, method ) {\n\tlet con = typeof window !== 'undefined' && window.console;\n\tif ( !con ) return;\n\n\tif ( !method ) {\n\t\tmethod = 'warn';\n\t}\n\tcon[ method ]( '***react-datetime:' + message );\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Datetime/webpack/universalModuleDefinition","webpack://Datetime/webpack/bootstrap","webpack://Datetime/external \"react\"","webpack://Datetime/external \"moment\"","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/external \"react-dom\"","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/./src/datetime/ViewNavigation.js","webpack://Datetime/./src/datetime/DaysView.js","webpack://Datetime/./src/datetime/MonthsView.js","webpack://Datetime/./src/datetime/YearsView.js","webpack://Datetime/./src/datetime/TimeView.js","webpack://Datetime/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://Datetime/./src/datetime/DateTime.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__3__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","e","updateDate","date","this","viewDate","locale","localeData","startOfMonth","clone","startOf","endOfMonth","endOf","renderNavigation","renderDayHeaders","renderDays","renderFooter","navigate","showView","months","year","month","dayItems","getDaysOfWeek","map","day","index","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","first","firstDayOfWeek","dow","_weekdaysMin","forEach","Math","floor","React","Component","MonthsView","event","renderMonths","viewYear","renderMonth","isDisabledMonth","_updateSelectedMonth","getMonthText","str","charAt","toUpperCase","slice","set","localMoment","monthStr","monthsShort","capitalize","substring","YearsView","parseInt","renderYears","selectedYear","renderYear","years","isDisabledYear","_updateSelectedYear","cache","disabledYearsCache","undefined","dayOfYear","timeConstraints","hours","min","max","step","minutes","seconds","milliseconds","TimeView","constraints","createConstraints","state","getTimeParts","keys","type","items","timeParts","getCounters","renderCounter","renderHeader","isAMPM","indexOf","onMouseDown","onStartClicking","dateFormat","action","button","toggleDayPart","update","body","document","setState","timer","setTimeout","increaseTimer","setInterval","mouseUpListener","clearTimeout","clearInterval","setTime","removeEventListener","addEventListener","tc","pad","length","padValues","counters","toLowerCase","ampm","prevProps","isNodeFound","current","componentNode","ignoreClass","correspondingElement","classList","contains","seed","passiveEventSupport","uid","handlersMap","enabledInstances","touchEvents","getEventHandlerOptions","instance","eventName","handlerOptions","passive","preventDefault","WrappedComponent","config","_class","_temp","displayName","_Component","subClass","superClass","onClickOutside","_this","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","__getComponentNode","setClickOutsideRef","enableOnClickOutside","_uid","options","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","target","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","ref","instanceRef","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","defaultProps","getClass","viewModes","TYPES","nofn","datetype","Date","Datetime","currentView","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","getFormat","_setTime","view","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","callHandler","inputProps","onFocus","_openCalendar","isValid","onKeyDown","which","closeOnTab","console","log","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","renderView","_renderCalendar","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","renderer","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","initialViewDate","getInitialInputValue","propDate","getInitialDate","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","defaultValue","longDateFormat","getDateFormat","getLocaleData","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tz","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","me","logError","message","method","con","onCalendarOpen","onCalendarClose","next","createRef","container","children"],"mappings":"CAAA,SAA2CA,EAAMC,GAE1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,UAAWA,QAAQ,cAE7C,mBAAXC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,e","file":"react-datetime.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t//React datetime\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"moment\"), require(\"react-dom\"));\n\t//React datetime\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"moment\", \"react-dom\"], factory);\n\t//React datetime\n\telse if(typeof exports === 'object')\n\t\texports[\"Datetime\"] = factory(require(\"react\"), require(\"moment\"), require(\"react-dom\"));\n\t//React datetime\n\telse\n\t\troot[\"Datetime\"] = factory(root[\"react\"], root[\"moment\"], root[\"react-dom\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import React from 'react';\n\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{ switchContent }\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class DaysView extends React.Component {\n\tstatic defaultProps = {\n\t\tisValidDate: () => true\n\t}\n\n\trender() {\n\t\tconst date = this.props.viewDate;\n\t\tconst locale = date.localeData();\n\n\t\tlet startOfMonth = date.clone().startOf('month');\n\t\tlet endOfMonth = date.clone().endOf('month');\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( date, locale ) }\n\t\t\t\t\t\t{ this.renderDayHeaders( locale ) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderDays( date, startOfMonth, endOfMonth ) }\n\t\t\t\t\t\n\t\t\t\t\t{ this.renderFooter( date ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( date, locale ) {\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'months' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\n\t\t\t\tswitchColSpan={5}\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderDayHeaders( locale ) {\n\t\tlet dayItems = this.getDaysOfWeek( locale ).map( (day, index) => (\n\t\t\t{ day }\n\t\t));\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ dayItems }\n\t\t\t\n\t\t);\n\t}\n\n\trenderDays( date, startOfMonth, endOfMonth ) {\n\t\t// We need 42 days in 6 rows\n\t\t// starting in the last week of the previous month\n\t\tlet rows = [[], [], [], [], [], []];\n\n\t\tlet startDate = date.clone().subtract( 1, 'months');\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\n\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\n\t\tlet i = 0;\n\n\t\twhile ( startDate.isBefore( endDate ) ) {\n\t\t\tlet row = this.getRow( rows, i++ );\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\n\t\t\tstartDate.add( 1, 'd' );\n\t\t}\n\n\t\treturn rows.map( (r, i) => (\n\t\t\t{ r }\n\t\t));\n\t}\n\n\trenderDay( date, startOfMonth, endOfMonth ) {\n\t\tlet selectedDate = this.props.selectedDate;\n\n\t\tlet dayProps = {\n\t\t\tkey: date.format('M_D'),\n\t\t\t'data-value': date.date(),\n\t\t\t'data-month': date.month(),\n\t\t\t'data-year': date.year()\n\t\t};\n\n\t\tlet className = 'rdtDay';\n\t\tif ( date.isBefore( startOfMonth ) ) {\n\t\t\tclassName += ' rdtOld';\n\t\t}\n\t\telse if ( date.isAfter( endOfMonth ) ) {\n\t\t\tclassName += ' rdtNew';\n\t\t}\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\n\t\t\tclassName += ' rdtToday';\n\t\t}\n\n\t\tif ( this.props.isValidDate(date) ) {\n\t\t\tdayProps.onClick = this._setDate;\n\t\t}\n\t\telse {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\n\t\tdayProps.className = className;\n\n\t\tif ( this.props.renderDay ) {\n\t\t\treturn this.props.renderDay(\n\t\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t{ date.date() }\n\t\t);\n\t}\n\n\trenderFooter( date ) {\n\t\tif ( !this.props.timeFormat ) return;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('time') }\n\t\t\t\t\t\tcolSpan={7}\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\t_setDate = e => {\n\t\tthis.props.updateDate( e );\n\t}\n\n\t/**\n\t * Get a list of the days of the week\n\t * depending on the current locale\n\t * @return {array} A list with the shortname of the days\n\t */\n\tgetDaysOfWeek(locale) {\n\t\tconst first = locale.firstDayOfWeek();\n\t\tlet dow = [];\n\t\tlet i = 0;\n\n\t\tlocale._weekdaysMin.forEach(function (day) {\n\t\t\tdow[(7 + (i++) - first) % 7] = day;\n\t\t});\n\n\t\treturn dow;\n\t}\n\n\tgetRow( rows, day ) {\n\t\treturn rows[ Math.floor( day / 7 ) ];\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class MonthsView extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderMonths() }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation() {\n\t\tlet year = this.props.viewDate.year();\n\n\t\treturn (\n\t\t\t this.props.navigate( -1, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\n\t\t\t\tswitchContent={ year }\n\t\t\t\tswitchColSpan=\"2\"\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderMonths( viewYear ) {\n\t\t// 12 months in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\n\t\tfor ( let month = 0; month < 12; month++ ) {\n\t\t\tlet row = this.getRow( rows, month );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderMonth( month, this.props.selectedDate )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (months, i) => (\n\t\t\t{ months }\n\t\t));\n\t}\n\n\trenderMonth( month, selectedDate ) {\n\t\tlet className = 'rdtMonth';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledMonth( month ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedMonth;\n\t\t}\n\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\n\n\t\tif ( this.props.renderMonth ) {\n\t\t\treturn this.props.renderMonth(\n\t\t\t\tprops,\n\t\t\t\tmonth,\n\t\t\t\tthis.props.viewDate.year(),\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.getMonthText( month ) }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 4 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 8 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tcapitalize( str ) {\n\t\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n\t}\n\n\tisDisabledMonth( month ) {\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the month is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({month});\n\t\tlet day = date.endOf( 'month' ).date() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.date(day) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tgetMonthText( month ) {\n\t\tconst localMoment = this.props.viewDate;\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\n\n\t\t// Because some months are up to 5 characters long, we want to\n\t\t// use a fixed string length for consistency\n\t\treturn this.capitalize( monthStr.substring( 0, 3 ) );\n\t}\n\n\t_updateSelectedMonth = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\nimport ViewNavigation from './ViewNavigation';\n\nexport default class YearsView extends React.Component {\n\trender() {\n\t\tconst viewYear = parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderNavigation( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ this.renderYears( viewYear ) }\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderNavigation( viewYear ) {\n\t\treturn (\n\t\t\t this.props.navigate( -10, 'years' ) }\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderYears( viewYear ) {\n\t\t// 12 years in 3 rows for every view\n\t\tlet rows = [ [], [], [] ];\n\t\tlet selectedYear = this.props.selectedDate && this.props.selectedDate.year();\n\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\n\t\t\tlet row = this.getRow( rows, year - viewYear );\n\n\t\t\trow.push(\n\t\t\t\tthis.renderYear( year, selectedYear )\n\t\t\t);\n\t\t}\n\n\t\treturn rows.map( (years, i) => (\n\t\t\t{ years }\n\t\t));\n\t}\n\n\trenderYear( year, selectedYear ) {\n\t\tlet className = 'rdtYear';\n\t\tlet onClick;\n\n\t\tif ( this.isDisabledYear( year ) ) {\n\t\t\tclassName += ' rdtDisabled';\n\t\t}\n\t\telse {\n\t\t\tonClick = this._updateSelectedYear;\n\t\t}\n\n\t\tif ( selectedYear === year ) {\n\t\t\tclassName += ' rdtActive';\n\t\t}\n\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\n\n\t\tif ( this.props.renderYear ) {\n\t\t\treturn this.props.renderYear(\n\t\t\t\tprops,\n\t\t\t\tyear,\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{ year }\n\t\t\t\n\t\t);\n\t}\n\n\tgetRow( rows, year ) {\n\t\tif ( year < 3 ) {\n\t\t\treturn rows[0];\n\t\t}\n\t\tif ( year < 7 ) {\n\t\t\treturn rows[1];\n\t\t}\n\n\t\treturn rows[2];\n\t}\n\n\tdisabledYearsCache = {};\n\tisDisabledYear( year ) {\n\t\tlet cache = this.disabledYearsCache;\n\t\tif ( cache[year] !== undefined ) {\n\t\t\treturn cache[year];\n\t\t}\n\n\t\tlet isValidDate = this.props.isValidDate;\n\n\t\tif ( !isValidDate ) {\n\t\t\t// If no validator is set, all days are valid\n\t\t\treturn false;\n\t\t}\n\n\t\t// If one day in the year is valid, the year should be clickable\n\t\tlet date = this.props.viewDate.clone().set({year});\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\n\n\t\twhile ( day-- > 1 ) {\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\n\t\t\t\tcache[year] = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tcache[year] = true;\n\t\treturn true;\n\t}\n\n\t_updateSelectedYear = event => {\n\t\tthis.props.updateDate( event );\n\t}\n}\n","import React from 'react';\n\nconst timeConstraints = {\n\thours: {\n\t\tmin: 0,\n\t\tmax: 23,\n\t\tstep: 1\n\t},\n\tminutes: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tseconds: {\n\t\tmin: 0,\n\t\tmax: 59,\n\t\tstep: 1\n\t},\n\tmilliseconds: {\n\t\tmin: 0,\n\t\tmax: 999,\n\t\tstep: 1\n\t}\n};\n\nexport default class TimeView extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.constraints = this.createConstraints(props);\n\n\t\t// This component buffers the time part values in the state \n\t\t// while the user is pressing down the buttons\n\t\t// and call the prop `setTime` when the buttons are released\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\n\t}\n\n\tcreateConstraints( props ) {\n\t\tlet constraints = {};\n\n\t\tObject.keys( timeConstraints ).forEach( type => {\n\t\t\tconstraints[ type ] = { ...timeConstraints[type], ...(props.timeConstraints[type] || {}) };\n\t\t});\n\n\t\treturn constraints;\n\t}\n\n\trender() {\n\t\tlet items = [];\n\t\tconst timeParts = this.state;\n\t\t\n\t\tthis.getCounters().forEach( (c, i) => {\n\t\t\tif ( i && c !== 'ampm' ) {\n\t\t\t\titems.push(\n\t\t\t\t\t
:
\n\t\t\t\t);\n\t\t\t}\n\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\n\t\t});\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{ this.renderHeader() }\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{ items }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderCounter( type, value ) {\n\t\tif ( type === 'hours' && this.isAMPM() ) {\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\n\n\t\t\tif ( value === 0 ) {\n\t\t\t\tvalue = 12;\n\t\t\t}\n\t\t}\n\n\t\tif ( type === 'ampm' ) {\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\n\t\t\t\tvalue = this.props.viewDate.format('A');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = this.props.viewDate.format('a');\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\n\t\t\t\t
{ value }
\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\n\t\t\t
\n\t\t);\n\t}\n\n\trenderHeader() {\n\t\tif ( !this.props.dateFormat ) return;\n\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t this.props.showView('days') }>\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\tonStartClicking( e, action, type ) {\n\t\tif ( e && e.button && e.button !== 0 ) {\n\t\t\t// Only left clicks, thanks\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\n\n\t\tlet update = {};\n\t\tlet body = document.body;\n\t\tupdate[ type ] = this[ action ]( type );\n\t\tthis.setState( update );\n\n\t\tthis.timer = setTimeout( () => {\n\t\t\tthis.increaseTimer = setInterval( () => {\n\t\t\t\tupdate[ type ] = this[ action ]( type );\n\t\t\t\tthis.setState( update );\n\t\t\t}, 70);\n\t\t}, 500);\n\n\t\tthis.mouseUpListener = () => {\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearInterval( this.increaseTimer );\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\n\t\t};\n\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\n\t}\n\n\tpadValues = {\n\t\thours: 1,\n\t\tminutes: 2,\n\t\tseconds: 2,\n\t\tmilliseconds: 3\n\t}\n\n\ttoggleDayPart() {\n\t\tlet hours = parseInt( this.state.hours, 10 );\n\t\t\n\t\tif ( hours >= 12 ) {\n\t\t\thours -= 12;\n\t\t}\n\t\telse {\n\t\t\thours += 12;\n\t\t}\n\n\t\tthis.props.setTime( 'hours', hours );\n\t}\n\n\tincrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\n\t\tif ( value > tc.max )\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\n\t\treturn this.pad( type, value );\n\t}\n\n\tdecrease( type ) {\n\t\tconst tc = this.constraints[ type ];\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\n\t\tif ( value < tc.min )\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\n\t\treturn this.pad( type, value );\n\t}\n\n\tpad( type, value ) {\n\t\tlet str = value + '';\n\t\twhile ( str.length < this.padValues[ type ] )\n\t\t\tstr = '0' + str;\n\t\treturn str;\n\t}\n\n\tgetCounters() {\n\t\tlet counters = [];\n\t\tlet format = this.props.timeFormat;\n\t\t\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\n\t\t\tcounters.push('hours');\n\t\t\tif ( format.indexOf('m') !== -1 ) {\n\t\t\t\tcounters.push('minutes');\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\n\t\t\t\t\tcounters.push('seconds');\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\n\t\t\t\t\t\tcounters.push('milliseconds');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.isAMPM() ) {\n\t\t\tcounters.push('ampm');\n\t\t}\n\n\t\treturn counters;\n\t}\n\n\tisAMPM() {\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\n\t}\n\n\tgetTimeParts( date ) {\n\t\tconst hours = date.hours();\n\n\t\treturn {\n\t\t\thours: this.pad( 'hours', hours ),\n\t\t\tminutes: this.pad( 'minutes', date.minutes() ),\n\t\t\tseconds: this.pad( 'seconds', date.seconds() ),\n\t\t\tmilliseconds: this.pad('milliseconds', date.milliseconds() ),\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.selectedDate ) {\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\n\t\t\t}\n\t\t}\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\n\t\t}\n\t}\n}\n","import { Component, createElement } from 'react';\nimport { findDOMNode } from 'react-dom';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n/**\n * Check whether some DOM node is our Component's node.\n */\nfunction isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG elements do not technically reside in the rendered DOM, so\n // they do not have classList directly, but they offer a link to their\n // corresponding element, which can have classList. This extra check is for\n // that case.\n // See: http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGUseElement\n // Discussion: https://github.com/Pomax/react-onclickoutside/pull/17\n\n\n if (current.correspondingElement) {\n return current.correspondingElement.classList.contains(ignoreClass);\n }\n\n return current.classList.contains(ignoreClass);\n}\n/**\n * Try to find our node in a hierarchy of nodes, returning the document\n * node as highest node if our node is not found in the path up.\n */\n\nfunction findHighest(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // If source=local then this event came from 'somewhere'\n // inside and should be ignored. We could handle this with\n // a layered approach, too, but that requires going back to\n // thinking in terms of Dom node nesting, running counter\n // to React's 'you shouldn't care about the DOM' philosophy.\n\n\n while (current.parentNode) {\n if (isNodeFound(current, componentNode, ignoreClass)) {\n return true;\n }\n\n current = current.parentNode;\n }\n\n return current;\n}\n/**\n * Check if the browser scrollbar was clicked\n */\n\nfunction clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n}\n\n// ideally will get replaced with external dep\n// when rafrex/detect-passive-events#4 and rafrex/detect-passive-events#5 get merged in\nvar testPassiveEventSupport = function testPassiveEventSupport() {\n if (typeof window === 'undefined' || typeof window.addEventListener !== 'function') {\n return;\n }\n\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passive = true;\n }\n });\n\n var noop = function noop() {};\n\n window.addEventListener('testPassiveEventSupport', noop, options);\n window.removeEventListener('testPassiveEventSupport', noop, options);\n return passive;\n};\n\nfunction autoInc(seed) {\n if (seed === void 0) {\n seed = 0;\n }\n\n return function () {\n return ++seed;\n };\n}\n\nvar uid = autoInc();\n\nvar passiveEventSupport;\nvar handlersMap = {};\nvar enabledInstances = {};\nvar touchEvents = ['touchstart', 'touchmove'];\nvar IGNORE_CLASS_NAME = 'ignore-react-onclickoutside';\n/**\n * Options for addEventHandler and removeEventHandler\n */\n\nfunction getEventHandlerOptions(instance, eventName) {\n var handlerOptions = null;\n var isTouchEvent = touchEvents.indexOf(eventName) !== -1;\n\n if (isTouchEvent && passiveEventSupport) {\n handlerOptions = {\n passive: !instance.props.preventDefault\n };\n }\n\n return handlerOptions;\n}\n/**\n * This function generates the HOC function that you'll use\n * in order to impart onOutsideClick listening to an\n * arbitrary component. It gets called at the end of the\n * bootstrapping code to yield an instance of the\n * onClickOutsideHOC function defined inside setupHOC().\n */\n\n\nfunction onClickOutsideHOC(WrappedComponent, config) {\n var _class, _temp;\n\n var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(onClickOutside, _Component);\n\n function onClickOutside(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n\n _this.__outsideClickHandler = function (event) {\n if (typeof _this.__clickOutsideHandlerProp === 'function') {\n _this.__clickOutsideHandlerProp(event);\n\n return;\n }\n\n var instance = _this.getInstance();\n\n if (typeof instance.props.handleClickOutside === 'function') {\n instance.props.handleClickOutside(event);\n return;\n }\n\n if (typeof instance.handleClickOutside === 'function') {\n instance.handleClickOutside(event);\n return;\n }\n\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a handleClickOutside(event) function for processing outside click events.\");\n };\n\n _this.__getComponentNode = function () {\n var instance = _this.getInstance();\n\n if (config && typeof config.setClickOutsideRef === 'function') {\n return config.setClickOutsideRef()(instance);\n }\n\n if (typeof instance.setClickOutsideRef === 'function') {\n return instance.setClickOutsideRef();\n }\n\n return findDOMNode(instance);\n };\n\n _this.enableOnClickOutside = function () {\n if (typeof document === 'undefined' || enabledInstances[_this._uid]) {\n return;\n }\n\n if (typeof passiveEventSupport === 'undefined') {\n passiveEventSupport = testPassiveEventSupport();\n }\n\n enabledInstances[_this._uid] = true;\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n handlersMap[_this._uid] = function (event) {\n if (_this.componentNode === null) return;\n\n if (_this.props.preventDefault) {\n event.preventDefault();\n }\n\n if (_this.props.stopPropagation) {\n event.stopPropagation();\n }\n\n if (_this.props.excludeScrollbar && clickedScrollbar(event)) return;\n var current = event.target;\n\n if (findHighest(current, _this.componentNode, _this.props.outsideClickIgnoreClass) !== document) {\n return;\n }\n\n _this.__outsideClickHandler(event);\n };\n\n events.forEach(function (eventName) {\n document.addEventListener(eventName, handlersMap[_this._uid], getEventHandlerOptions(_this, eventName));\n });\n };\n\n _this.disableOnClickOutside = function () {\n delete enabledInstances[_this._uid];\n var fn = handlersMap[_this._uid];\n\n if (fn && typeof document !== 'undefined') {\n var events = _this.props.eventTypes;\n\n if (!events.forEach) {\n events = [events];\n }\n\n events.forEach(function (eventName) {\n return document.removeEventListener(eventName, fn, getEventHandlerOptions(_this, eventName));\n });\n delete handlersMap[_this._uid];\n }\n };\n\n _this.getRef = function (ref) {\n return _this.instanceRef = ref;\n };\n\n _this._uid = uid();\n return _this;\n }\n /**\n * Access the WrappedComponent's instance.\n */\n\n\n var _proto = onClickOutside.prototype;\n\n _proto.getInstance = function getInstance() {\n if (!WrappedComponent.prototype.isReactComponent) {\n return this;\n }\n\n var ref = this.instanceRef;\n return ref.getInstance ? ref.getInstance() : ref;\n };\n\n /**\n * Add click listeners to the current document,\n * linked to this component's state.\n */\n _proto.componentDidMount = function componentDidMount() {\n // If we are in an environment without a DOM such\n // as shallow rendering or snapshots then we exit\n // early to prevent any unhandled errors being thrown.\n if (typeof document === 'undefined' || !document.createElement) {\n return;\n }\n\n var instance = this.getInstance();\n\n if (config && typeof config.handleClickOutside === 'function') {\n this.__clickOutsideHandlerProp = config.handleClickOutside(instance);\n\n if (typeof this.__clickOutsideHandlerProp !== 'function') {\n throw new Error(\"WrappedComponent: \" + componentName + \" lacks a function for processing outside click events specified by the handleClickOutside config option.\");\n }\n }\n\n this.componentNode = this.__getComponentNode(); // return early so we dont initiate onClickOutside\n\n if (this.props.disableOnClickOutside) return;\n this.enableOnClickOutside();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.componentNode = this.__getComponentNode();\n };\n /**\n * Remove all document's event listeners for this component\n */\n\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.disableOnClickOutside();\n };\n /**\n * Can be called to explicitly enable event listening\n * for clicks and touches outside of this element.\n */\n\n\n /**\n * Pass-through render\n */\n _proto.render = function render() {\n // eslint-disable-next-line no-unused-vars\n var _props = this.props,\n excludeScrollbar = _props.excludeScrollbar,\n props = _objectWithoutProperties(_props, [\"excludeScrollbar\"]);\n\n if (WrappedComponent.prototype.isReactComponent) {\n props.ref = this.getRef;\n } else {\n props.wrappedRef = this.getRef;\n }\n\n props.disableOnClickOutside = this.disableOnClickOutside;\n props.enableOnClickOutside = this.enableOnClickOutside;\n return createElement(WrappedComponent, props);\n };\n\n return onClickOutside;\n }(Component), _class.displayName = \"OnClickOutside(\" + componentName + \")\", _class.defaultProps = {\n eventTypes: ['mousedown', 'touchstart'],\n excludeScrollbar: config && config.excludeScrollbar || false,\n outsideClickIgnoreClass: IGNORE_CLASS_NAME,\n preventDefault: false,\n stopPropagation: false\n }, _class.getClass = function () {\n return WrappedComponent.getClass ? WrappedComponent.getClass() : WrappedComponent;\n }, _temp;\n}\n\nexport { IGNORE_CLASS_NAME };\nexport default onClickOutsideHOC;\n","import PropTypes from 'prop-types';\nimport moment from 'moment';\nimport React from 'react';\nimport DaysView from './DaysView';\nimport MonthsView from './MonthsView';\nimport YearsView from './YearsView';\nimport TimeView from './TimeView';\nimport onClickOutside from 'react-onclickoutside';\n\nconst viewModes = {\n\tYEARS: 'years',\n\tMONTHS: 'months',\n\tDAYS: 'days',\n\tTIME: 'time',\n};\n\nconst TYPES = PropTypes;\nconst nofn = function () {};\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\n\nexport default class Datetime extends React.Component {\n\tstatic propTypes = {\n\t\tvalue: datetype,\n\t\tinitialValue: datetype,\n\t\tinitialViewDate: datetype,\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\n\t\tonOpen: TYPES.func,\n\t\tonClose: TYPES.func,\n\t\tonChange: TYPES.func,\n\t\tonNavigate: TYPES.func,\n\t\tonBeforeNavigate: TYPES.func,\n\t\tonNavigateBack: TYPES.func,\n\t\tonNavigateForward: TYPES.func,\n\t\tupdateOnView: TYPES.string,\n\t\tlocale: TYPES.string,\n\t\tutc: TYPES.bool,\n\t\tdisplayTimeZone: TYPES.string,\n\t\tinput: TYPES.bool,\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\n\t\tinputProps: TYPES.object,\n\t\ttimeConstraints: TYPES.object,\n\t\tisValidDate: TYPES.func,\n\t\topen: TYPES.bool,\n\t\tstrictParsing: TYPES.bool,\n\t\tcloseOnSelect: TYPES.bool,\n\t\tcloseOnTab: TYPES.bool,\n\t\trenderView: TYPES.func,\n\t\trenderInput: TYPES.func,\n\t\trenderDay: TYPES.func,\n\t\trenderMonth: TYPES.func,\n\t\trenderYear: TYPES.func,\n\t}\n\n\tstatic defaultProps = {\n\t\tonOpen: nofn,\n\t\tonClose: nofn,\n\t\tonCalendarOpen: nofn,\n\t\tonCalendarClose: nofn,\n\t\tonChange: nofn,\n\t\tonNavigate: nofn,\n\t\tonBeforeNavigate: function(next) { return next; }, \n\t\tonNavigateBack: nofn,\n\t\tonNavigateForward: nofn,\n\t\tdateFormat: true,\n\t\ttimeFormat: true,\n\t\tutc: false,\n\t\tclassName: '',\n\t\tinput: true,\n\t\tinputProps: {},\n\t\ttimeConstraints: {},\n\t\tisValidDate: function() { return true; },\n\t\tstrictParsing: true,\n\t\tcloseOnSelect: false,\n\t\tcloseOnTab: true,\n\t\tcloseOnClickOutside: true\n\t}\n\n\t// Make moment accessible through the Datetime class\n\tstatic moment = moment;\n\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = this.getInitialState( props );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{ this.renderInput() }\n\t\t\t\t
\n\t\t\t\t\t{ this.renderView( this.state.currentView, this._renderCalendar ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n\n\trenderInput() {\n\t\tif ( !this.props.input ) return;\n\n\t\tconst finalInputProps = {\n\t\t\ttype: 'text',\n\t\t\tclassName: 'form-control',\n\t\t\tvalue: this.getInputValue(),\n\t\t\t...this.props.inputProps,\n\t\t\tonFocus: this._onInputFocus,\n\t\t\tonChange: this._onInputChange,\n\t\t\tonKeyDown: this._onInputKeyDown,\n\t\t\tonClick: this._onInputClick\n\t\t};\n\n\t\tif ( this.props.renderInput ) { \n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n\n\trenderView( currentView, renderer ) {\n\t\tif ( this.props.renderView ) {\n\t\t\treturn this.props.renderView( currentView, () => renderer(currentView) );\n\t\t}\n\t\treturn renderer( this.state.currentView );\n\t}\n\n\t_renderCalendar = currentView => {\n\t\tconst props = this.props;\n\t\tconst state = this.state;\n\n\t\tlet viewProps = {\n\t\t\tviewDate: state.viewDate.clone(),\n\t\t\tselectedDate: this.getSelectedDate(),\n\t\t\tisValidDate: props.isValidDate,\n\t\t\tupdateDate: this._updateDate,\n\t\t\tnavigate: this._viewNavigate,\n\t\t\tmoment: moment,\n\t\t\tshowView: this._showView\n\t\t};\n\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\n\t\tswitch ( currentView ) {\n\t\t\tcase viewModes.YEARS:\n\t\t\t\t// Used viewProps\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderYear = props.renderYear;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.MONTHS:\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tcase viewModes.DAYS:\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \n\t\t\t\tviewProps.renderDay = props.renderDay;\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\treturn ;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\n\t\t\t\tviewProps.setTime = this._setTime;\n\t\t\t\treturn ;\n\t\t}\n\t}\n\n\tgetInitialState( p ) {\n\t\tlet props = p || this.props;\n\t\tlet inputFormat = this.getFormat('datetime');\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\n\n\t\tthis.checkTZ( props );\n\n\t\treturn {\n\t\t\topen: !props.input,\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView( this.getFormat('date') ),\n\t\t\tviewDate: this.getInitialViewDate( props.initialViewDate, selectedDate, inputFormat ),\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\n\t\t\tinputValue: this.getInitialInputValue( props, selectedDate, inputFormat )\n\t\t};\n\t}\n\t\n\tgetInitialViewDate( propDate, selectedDate, format ) {\n\t\tlet viewDate;\n\t\tif ( propDate ) {\n\t\t\tviewDate = this.parseDate( propDate, format );\n\t\t\tif ( viewDate && viewDate.isValid() ) {\n\t\t\t\treturn viewDate;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.log('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\n\t\t\t}\n\t\t}\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\n\t\t\treturn selectedDate.clone();\n\t\t}\n\t\treturn this.getInitialDate();\n\t}\n\n\tgetInitialDate() {\n\t\tlet m = this.localMoment();\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\n\t\treturn m;\n\t}\n\n\tgetInitialView( dateFormat ) {\n\t\tif ( !dateFormat ) return viewModes.TIME;\n\t\treturn this.getUpdateOn( dateFormat );\n\t}\n\n\tparseDate(date, dateFormat) {\n\t\tlet parsedDate;\n\n\t\tif (date && typeof date === 'string')\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\n\t\telse if (date)\n\t\t\tparsedDate = this.localMoment(date);\n\n\t\tif (parsedDate && !parsedDate.isValid())\n\t\t\tparsedDate = null;\n\n\t\treturn parsedDate;\n\t}\n\n\tgetClassName() {\n\t\tlet cn = 'rdt';\n\t\tlet props = this.props;\n\t\tlet propCn = props.className;\n\n\t\tif ( Array.isArray( propCn ) ) {\n\t\t\tcn += ' ' + propCn.join(' ');\n\t\t}\n\t\telse if ( propCn ) {\n\t\t\tcn += ' ' + propCn;\n\t\t}\n\n\t\tif ( !props.input ) {\n\t\t\tcn += ' rdtStatic';\n\t\t}\n\t\tif ( this.isOpen() ) {\n\t\t\tcn += ' rdtOpen';\n\t\t}\n\n\t\treturn cn;\n\t}\n\t\n\tisOpen() {\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\n\t}\n\n\tgetUpdateOn( dateFormat ) {\n\t\tif ( this.props.updateOnView ) {\n\t\t\treturn this.props.updateOnView;\n\t\t}\n\n\t\tif ( dateFormat.match(/[lLD]/) ) {\n\t\t\treturn viewModes.DAYS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\n\t\t\treturn viewModes.MONTHS;\n\t\t}\n\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\n\t\t\treturn viewModes.YEARS;\n\t\t}\n\n\t\treturn viewModes.DAYS;\n\t}\n\n\tgetLocaleData( props ) {\n\t\tlet p = props || this.props;\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\n\t}\n\n\tgetDateFormat( locale ) {\n\t\tlet format = this.props.dateFormat;\n\t\tif ( format === true ) return locale.longDateFormat('L');\n\t\tif ( format ) return format;\n\t\treturn '';\n\t}\n\n\tgetTimeFormat( locale ) {\n\t\tlet format = this.props.timeFormat;\n\t\tif ( format === true ) {\n\t\t\treturn locale.longDateFormat('LT');\n\t\t}\n\t\treturn format || '';\n\t}\n\n\tgetFormat( type ) {\n\t\tif ( type === 'date' ) {\n\t\t\treturn this.getDateFormat( this.getLocaleData() );\n\t\t}\n\t\telse if ( type === 'time' ) {\n\t\t\treturn this.getTimeFormat( this.getLocaleData() );\n\t\t}\n\t\t\n\t\tlet locale = this.getLocaleData();\n\t\tlet dateFormat = this.getDateFormat( locale );\n\t\tlet timeFormat = this.getTimeFormat( locale );\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\n\t}\n\n\t_showView = ( view, date ) => {\n\t\tconst d = ( date || this.state.viewDate ).clone();\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\n\n\t\tif ( nextView && this.state.currentView !== nextView ) {\n\t\t\tthis.props.onNavigate( nextView );\n\t\t\tthis.setState({ currentView: nextView });\n\t\t}\n\t}\n\n\tupdateTime( op, amount, type, toSelected ) {\n\t\tlet update = {};\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\n\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\n\n\t\tthis.setState( update );\n\t}\n\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\n\tnextView = { days: 'time', months: 'days', years: 'months'};\n\t_updateDate = e => {\n\t\tlet state = this.state;\n\t\tlet currentView = state.currentView;\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\n\t\tlet viewDate = this.state.viewDate.clone();\n\n\t\t// Set the value into day/month/year\n\t\tviewDate[ this.viewToMethod[currentView] ](\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\n\t\t);\n\n\t\t// Need to set month and year will for days view (prev/next month)\n\t\tif ( currentView === 'days' ) {\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\n\t\t}\n\n\t\tlet update = {viewDate: viewDate};\n\t\tif ( currentView === updateOnView ) {\n\t\t\tupdate.selectedDate = viewDate.clone();\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\n\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\n\t\t\t\tthis._closeCalendar();\n\t\t\t}\n\n\t\t\tthis.props.onChange( viewDate.clone() );\n\t\t}\n\t\telse {\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\n\t\t}\n\n\t\tthis.setState( update );\n\t}\n\n\t_viewNavigate = ( modifier, unit ) => {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\t\n\t\t// Subtracting is just adding negative time\n\t\tviewDate.add( modifier, unit );\n\n\t\tif ( modifier > 0 ) {\n\t\t\tthis.props.onNavigateForward( modifier, unit );\n\t\t}\n\t\telse {\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\n\t\t}\n\n\t\tthis.setState({viewDate});\n\t}\n\t\n\t_setTime = ( type, value ) => {\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\n\t\t\n\t\tdate[ type ]( value );\n\n\t\tif ( !this.props.value ) {\n\t\t\tthis.setState({\n\t\t\t\tselectedDate: date,\n\t\t\t\tviewDate: date.clone(),\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\n\t\t\t});\n\t\t}\n\n\t\tthis.props.onChange( date );\n\t}\n\n\t_openCalendar = () => {\n\t\tif ( this.isOpen() ) return;\n\t\tthis.setState({open: true}, this.props.onOpen );\n\t}\n\n\t_closeCalendar = () => {\n\t\tif ( !this.isOpen() ) return;\n\n\t\tthis.setState({open: false}, () => {\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\n\t\t});\n\t}\n\n\t_handleClickOutside = () => {\n\t\tlet props = this.props;\n\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\tlocalMoment( date, format, props ) {\n\t\tprops = props || this.props;\n\t\tlet m = null;\n\n\t\tif (props.utc) {\n\t\t\tm = moment.utc(date, format, props.strictParsing);\n\t\t} else if (props.displayTimeZone) {\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\n\t\t} else {\n\t\t\tm = moment(date, format, props.strictParsing);\n\t\t}\n\n\t\tif ( props.locale )\n\t\t\tm.locale( props.locale );\n\t\treturn m;\n\t}\n\n\tcheckTZ( props ) {\n\t\tif ( props.displayTimeZone && !this.tzWarning && !moment.tz ) {\n\t\t\tthis.tzWarning = true;\n\t\t\tthis.log('displayTimeZone prop with value \"' + props.displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps === this.props ) return;\n\n\t\tlet needsUpdate = false;\n\t\tlet thisProps = this.props;\n\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\n\t\t});\n\n\t\tif ( needsUpdate ) {\n\t\t\tthis.regenerateDates( this.props );\n\t\t}\n\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\n\t\t\tthis.setViewDate( thisProps.value );\n\t\t}\n\n\t\tthis.checkTZ( this.props );\n\t}\n\n\tregenerateDates(props) {\n\t\tlet viewDate = this.state.viewDate.clone();\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\n\n\t\tif ( props.locale ) {\n\t\t\tviewDate.locale( props.locale );\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\n\t\t}\n\t\tif ( props.utc ) {\n\t\t\tviewDate.utc();\n\t\t\tselectedDate &&\tselectedDate.utc();\n\t\t}\n\t\telse if ( props.displayTimeZone ) {\n\t\t\tviewDate.tz( props.displayTimeZone );\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\n\t\t}\n\t\telse {\n\t\t\tviewDate.locale();\n\t\t\tselectedDate &&\tselectedDate.locale();\n\t\t}\n\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\n\t\tif ( selectedDate && selectedDate.isValid() ) {\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\n\t\t}\n\t\t\n\t\tthis.setState( update );\n\t}\n\n\tgetSelectedDate() {\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\n\t}\n\n\tgetInitialInputValue( props, selectedDate, inputFormat ) {\n\t\tif ( props.inputProps.value )\n\t\t\treturn props.inputProps.value;\n\t\t\n\t\tif ( selectedDate && selectedDate.isValid() )\n\t\t\treturn selectedDate.format( inputFormat );\n\t\t\n\t\tif ( props.value && typeof props.value === 'string' )\n\t\t\treturn props.value;\n\t\t\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\n\t\t\treturn props.initialValue;\n\t\t\n\t\treturn '';\n\t}\n\n\tgetInputValue() {\n\t\tlet selectedDate = this.getSelectedDate();\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\n\t}\n\n\t/**\n\t * Set the date that is currently shown in the calendar.\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\n\t * @param dateType date\n\t * @public\n\t */\n\tsetViewDate( date ) {\n\t\tlet me = this;\n\t\tlet logError = function() {\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\n\t\t};\n\n\t\tif ( !date ) return logError();\n\t\t\n\t\tlet viewDate;\n\t\tif ( typeof date === 'string' ) {\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\n\t\t}\n\t\telse {\n\t\t\tviewDate = this.localMoment( date );\n\t\t}\n\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\n\t\tthis.setState({ viewDate: viewDate });\n\t}\n\n\t/**\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\n\t * @param TYPES.string mode \n\t */\n\tnavigate( mode ) {\n\t\tthis._showView( mode );\n\t}\n\n\tlog( message, method ) {\n\t\tlet con = typeof window !== 'undefined' && window.console;\n\t\tif ( !con ) return;\n\n\t\tif ( !method ) {\n\t\t\tmethod = 'warn';\n\t\t}\n\t\tcon[ method ]( '***react-datetime:' + message );\n\t}\n\n\t_onInputFocus = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\t_onInputChange = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\n\n\t\tconst value = e.target ? e.target.value : e;\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\n\t\tlet update = { inputValue: value };\n\n\t\tif ( localMoment.isValid() ) {\n\t\t\tupdate.selectedDate = localMoment;\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\n\t\t}\n\t\telse {\n\t\t\tupdate.selectedDate = null;\n\t\t}\n\n\t\tthis.setState( update, () => {\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\n\t\t});\n\t}\n\n\t_onInputKeyDown = e => {\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\n\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\n\t\t\tthis._closeCalendar();\n\t\t}\n\t}\n\n\t_onInputClick = e => {\n\t\t// Focus event should open the calendar, but there is some case where\n\t\t// the input is already focused and the picker is closed, so clicking the input\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\n\t\tconsole.log('CLICKING 2!');\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\n\t\tthis._openCalendar();\n\t}\n\n\tcallHandler( method, e ) {\n\t\tif ( !method ) return true;\n\t\treturn method(e) !== false;\n\t}\n}\n\nclass ClickOutBase extends React.Component {\n\tcontainer = React.createRef();\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ this.props.children }\n\t\t\t
\n\t\t);\n\t}\n\thandleClickOutside(e) {\n\t\tthis.props.onClickOut( e );\n\t}\n\n\tsetClickOutsideRef() {\n\t\treturn this.container.current;\n\t}\n}\n\nconst ClickableWrapper = onClickOutside( ClickOutBase );\n"],"sourceRoot":""} \ No newline at end of file From 410eb6a75a42920b48d66ca9f5b771cd192d2a3f Mon Sep 17 00:00:00 2001 From: Vahissan Nandakumar Date: Mon, 30 Nov 2020 22:36:25 -0500 Subject: [PATCH 3/3] Added couple of test cases for ESC and ArrowDown key behavior --- test/tests.spec.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/tests.spec.js b/test/tests.spec.js index 80ee215c6..7090d5388 100644 --- a/test/tests.spec.js +++ b/test/tests.spec.js @@ -570,6 +570,17 @@ describe('Datetime', () => { expect(utils.isOpen(component)).toBeFalsy(); }); + it('close by ESC key', () => { + const date = new Date(2000, 0, 15, 2, 2, 2, 2), + component = utils.createDatetime({ value: date }); + + expect(utils.isOpen(component)).toBeFalsy(); + utils.openDatepicker(component); + expect(utils.isOpen(component)).toBeTruthy(); + component.find('.form-control').simulate('keyDown', { key: 'Escape', keyCode: 27, which: 27 }); + expect(utils.isOpen(component)).toBeFalsy(); + }); + it('open by click', () => { const date = new Date(2000, 0, 15, 2, 2, 2, 2); const component = utils.createDatetime({ value: date, closeOnClickOutside: true }); @@ -582,6 +593,15 @@ describe('Datetime', () => { expect( component.instance().state.open ).toBeTruthy(); }); + it('open by ArrowDown key', () => { + const date = new Date(2000, 0, 15, 2, 2, 2, 2), + component = utils.createDatetime({ value: date }); + + expect(utils.isOpen(component)).toBeFalsy(); + component.find('.form-control').simulate('keyDown', { key: 'ArrowDown', keyCode: 40, which: 40 }); + expect(utils.isOpen(component)).toBeTruthy(); + }); + it('increase time', () => { let i = 0; const date = new Date(2000, 0, 15, 2, 2, 2, 2),