From 5768f0c66cb811927e7a069b15b28deefddb8f8b Mon Sep 17 00:00:00 2001 From: Alistair Wells Date: Wed, 18 Nov 2020 16:24:28 +0100 Subject: [PATCH] Rebuilt to remove console.log --- 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 7c4763eb7..a33f1f52d 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;return(t=n.localeData().monthsShort(n.month(e)).substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&k(t.prototype,n),a}(c().Component);function V(e,t){return t<4?e[0]:t<8?e[1]:e[2]}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),a}(c().Component);function A(e,t){return t<3?e[0]:t<7?e[1]:e[2]}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){for(var n=0;n=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))),J(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),ge(ve(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)})),ge(ve(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),ge(ve(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),ge(ve(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),ge(ve(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),ge(ve(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)}))}})),ge(ve(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),ge(ve(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(),r}return fe(n,[{key:"render",value:function(){return c().createElement(Fe,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c().createElement("div",{className:"rdtPicker"},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=ue(ue({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().createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c().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;Se('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):ke}},{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]/)?De:-1!==e.indexOf("M")?Oe:-1!==e.indexOf("Y")?we:De}},{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={},i=r?"selectedDate":"viewDate";o[i]=this.state[i].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?a().utc(e,t,n.strictParsing):n.displayTimeZone?a().tz(e,t,n.displayTimeZone):a()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||a().tz||(this.tzWarning=!0,Se('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;return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):n.log("Invalid date passed to the `setViewDate` method: "+e)}},{key:"navigate",value:function(e){this._showView(e)}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c().Component);function Se(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}ge(Pe,"propTypes",{value:Ee,initialValue:Ee,initialViewDate:Ee,initialViewMode:Ce.oneOf([we,Oe,De,ke]),onOpen:Ce.func,onClose:Ce.func,onChange:Ce.func,onNavigate:Ce.func,onBeforeNavigate:Ce.func,onNavigateBack:Ce.func,onNavigateForward:Ce.func,updateOnView:Ce.string,locale:Ce.string,utc:Ce.bool,displayTimeZone:Ce.string,input:Ce.bool,dateFormat:Ce.oneOfType([Ce.string,Ce.bool]),timeFormat:Ce.oneOfType([Ce.string,Ce.bool]),inputProps:Ce.object,timeConstraints:Ce.object,isValidDate:Ce.func,open:Ce.bool,strictParsing:Ce.bool,closeOnSelect:Ce.bool,closeOnTab:Ce.bool,renderView:Ce.func,renderInput:Ce.func,renderDay:Ce.func,renderMonth:Ce.func,renderYear:Ce.func}),ge(Pe,"defaultProps",{onOpen:_e,onClose:_e,onCalendarOpen:_e,onCalendarClose:_e,onChange:_e,onNavigate:_e,onBeforeNavigate:function(e){return e},onNavigateBack:_e,onNavigateForward:_e,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()}}),ge(Pe,"moment",a());var je,Ve,Te,Ne,xe,Fe=(je=function(e){de(n,e);var t=me(n);function n(){var e;le(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["excludeScrollbar"]));return je.prototype.isReactComponent?t.ref=this.getRef:t.wrappedRef=this.getRef,t.disableOnClickOutside=this.disableOnClickOutside,t.enableOnClickOutside=this.enableOnClickOutside,(0,s.createElement)(je,t)},r}(s.Component),Te.displayName="OnClickOutside("+xe+")",Te.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:Ve&&Ve.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},Te.getClass=function(){return je.getClass?je.getClass():je},Ne)},703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==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:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(628)}(); //# sourceMappingURL=react-datetime.cjs.js.map \ No newline at end of file diff --git a/dist/react-datetime.cjs.js.map b/dist/react-datetime.cjs.js.map index 7f216b0de..d8535fd0c 100644 --- a/dist/react-datetime.cjs.js.map +++ b/dist/react-datetime.cjs.js.map @@ -1 +1 @@ -{"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,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kCE,CACrB6B,OAAQhC,GACRiC,QAASjC,GACTwG,eAAgBxG,GAChByG,gBAAiBzG,GACjB0B,SAAU1B,GACVe,WAAYf,GACZc,iBAAkB,SAAS4F,GAAQ,OAAOA,GAC1C5E,eAAgB9B,GAChB6B,kBAAmB7B,GACnB5G,YAAY,EACZhE,YAAY,EACZsQ,KAAK,EACLtT,UAAW,GACXmP,OAAO,EACPa,WAAY,GACZxK,gBAAiB,GACjB1C,YAAa,WAAa,OAAO,GACjCyQ,eAAe,EACfnE,eAAe,EACfkB,YAAY,EACZR,qBAAqB,I,GAvDF/B,G,SA2DJlL,K,IA2iBX6N,GAAmBrG,G,mMAlBZ7G,IAAM+Q,a,8CAGjB,OACC,yBAAKvU,UAAYO,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 +{"version":3,"sources":["webpack://Datetime/external \"moment\"","webpack://Datetime/external \"react\"","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/external \"react-dom\"","webpack://Datetime/./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack://Datetime/./src/DateTime.js","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/webpack/bootstrap","webpack://Datetime/webpack/startup","webpack://Datetime/webpack/runtime/compat get default export","webpack://Datetime/webpack/runtime/define property getters","webpack://Datetime/webpack/runtime/hasOwnProperty shorthand","webpack://Datetime/webpack/runtime/make namespace object"],"names":["require","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","e","props","updateDate","this","renderNavigation","renderDayHeaders","renderDays","renderFooter","date","viewDate","locale","localeData","navigate","showView","months","year","month","first","dow","i","dayItems","firstDayOfWeek","_weekdaysMin","forEach","day","map","index","key","startOfMonth","clone","startOf","endOfMonth","endOf","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","r","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","React","Math","floor","MonthsView","event","renderMonths","renderMonth","isDisabledMonth","_updateSelectedMonth","getMonthText","set","str","localMoment","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","Object","keys","type","state","getTimeParts","items","timeParts","getCounters","c","renderCounter","renderHeader","value","isAMPM","indexOf","onMouseDown","onStartClicking","dateFormat","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","viewModes","TYPES","PropTypes","nofn","datetype","oneOfType","instanceOf","Date","string","Datetime","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","currentView","getFormat","_setTime","view","d","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","target","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","callHandler","inputProps","onFocus","_openCalendar","isValid","onKeyDown","which","closeOnTab","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","renderView","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","_renderCalendar","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","getInitialInputValue","propDate","initialViewDate","log","getInitialDate","m","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","p","defaultValue","getLocaleData","longDateFormat","getDateFormat","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","tz","me","mode","method","message","con","window","console","oneOf","func","bool","object","onCalendarOpen","onCalendarClose","next","_","renderFunc","WrappedComponent","config","_class","_temp","componentName","ref","container","children","displayName","name","_Component","subClass","superClass","onClickOutside","_this","call","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","Error","__getComponentNode","setClickOutsideRef","findDOMNode","enableOnClickOutside","_uid","options","defineProperty","get","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","instanceRef","prototype","create","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","Component","defaultProps","getClass","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","propName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","array","number","symbol","any","arrayOf","element","elementType","node","objectOf","shape","exact","checkPropTypes","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","n","getter","__esModule","a","definition","o","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag"],"mappings":"+IAAI,EAA+BA,QAAQ,U,SCAvC,EAA+BA,QAAQ,S,wNCE5B,SAASC,EAAT,GAAkH,IAAvFC,EAAuF,EAAvFA,YAAaC,EAA0E,EAA1EA,cAAeC,EAA2D,EAA3DA,YAAaC,EAA8C,EAA9CA,cAAeC,EAA+B,EAA/BA,cAAeC,EAAgB,EAAhBA,YAChH,OACC,4BACC,wBAAIC,UAAU,UAAUC,QAAUP,GACjC,oCAED,0BAAIM,UAAU,YAAYE,QAAUJ,EAAgBG,QAAUN,GAAoBI,GAC/EF,GAEH,wBAAIG,UAAU,UAAUC,QAAUL,GACjC,qC,ogCCTiBO,E,kzBAoIT,SAAAC,GACV,EAAKC,MAAMC,WAAYF,M,gDA9HvB,OACC,yBAAKJ,UAAU,W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EAAOC,QAASuB,GAG/CxB,EAAOC,QCjBf,OCFAuB,EAAoBG,EAAI,SAAS3B,GAChC,IAAI4B,EAAS5B,GAAUA,EAAO6B,WAC7B,WAAa,OAAO7B,EAAgB,SACpC,WAAa,OAAOA,GAErB,OADAwB,EAAoB3M,EAAE+M,EAAQ,CAAEE,EAAGF,IAC5BA,GCLRJ,EAAoB3M,EAAI,SAASoL,EAAS8B,GACzC,IAAI,IAAIxW,KAAOwW,EACXP,EAAoBQ,EAAED,EAAYxW,KAASiW,EAAoBQ,EAAE/B,EAAS1U,IAC5EsE,OAAOmN,eAAeiD,EAAS1U,EAAK,CAAE0W,YAAY,EAAMhF,IAAK8E,EAAWxW,MCJ3EiW,EAAoBQ,EAAI,SAASE,EAAKC,GAAQ,OAAOtS,OAAOwO,UAAU+D,eAAehG,KAAK8F,EAAKC,ICC/FX,EAAoBjV,EAAI,SAAS0T,GACX,oBAAXoC,QAA0BA,OAAOC,aAC1CzS,OAAOmN,eAAeiD,EAASoC,OAAOC,YAAa,CAAE9R,MAAO,WAE7DX,OAAOmN,eAAeiD,EAAS,aAAc,CAAEzP,OAAO,KJFhDgR,EAAoB,K","file":"react-datetime.cjs.js","sourcesContent":["var __WEBPACK_NAMESPACE_OBJECT__ = require(\"moment\");;","var __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");;","import React from 'react';\r\n\r\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{ switchContent }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class DaysView extends React.Component {\r\n\tstatic defaultProps = {\r\n\t\tisValidDate: () => true,\r\n\t\trenderDay: ( props, date ) => { date.date() },\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\t{ this.renderDayHeaders() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderDays() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t{ this.renderFooter() }\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tconst date = this.props.viewDate;\r\n\t\tconst locale = date.localeData();\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -1, 'months' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\r\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\r\n\t\t\t\tswitchColSpan={5}\r\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderDayHeaders() {\r\n\t\tconst locale = this.props.viewDate.localeData();\r\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\r\n\t\t\t{ day }\r\n\t\t));\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ dayItems }\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\trenderDays() {\r\n\t\tconst date = this.props.viewDate;\r\n\t\tconst startOfMonth = date.clone().startOf('month');\r\n\t\tconst endOfMonth = date.clone().endOf('month');\r\n\r\n\t\t// We need 42 days in 6 rows\r\n\t\t// starting in the last week of the previous month\r\n\t\tlet rows = [[], [], [], [], [], []];\r\n\r\n\t\tlet startDate = date.clone().subtract( 1, 'months');\r\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\r\n\r\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\r\n\t\tlet i = 0;\r\n\r\n\t\twhile ( startDate.isBefore( endDate ) ) {\r\n\t\t\tlet row = getRow( rows, i++ );\r\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\r\n\t\t\tstartDate.add( 1, 'd' );\r\n\t\t}\r\n\r\n\t\treturn rows.map( (r, i) => (\r\n\t\t\t{ r }\r\n\t\t));\r\n\t}\r\n\r\n\trenderDay( date, startOfMonth, endOfMonth ) {\r\n\t\tlet selectedDate = this.props.selectedDate;\r\n\r\n\t\tlet dayProps = {\r\n\t\t\tkey: date.format('M_D'),\r\n\t\t\t'data-value': date.date(),\r\n\t\t\t'data-month': date.month(),\r\n\t\t\t'data-year': date.year()\r\n\t\t};\r\n\r\n\t\tlet className = 'rdtDay';\r\n\t\tif ( date.isBefore( startOfMonth ) ) {\r\n\t\t\tclassName += ' rdtOld';\r\n\t\t}\r\n\t\telse if ( date.isAfter( endOfMonth ) ) {\r\n\t\t\tclassName += ' rdtNew';\r\n\t\t}\r\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\r\n\t\t\tclassName += ' rdtToday';\r\n\t\t}\r\n\r\n\t\tif ( this.props.isValidDate(date) ) {\r\n\t\t\tdayProps.onClick = this._setDate;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\r\n\t\tdayProps.className = className;\r\n\r\n\t\treturn this.props.renderDay(\r\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\r\n\t\t);\r\n\t}\r\n\r\n\trenderFooter() {\r\n\t\tif ( !this.props.timeFormat ) return;\r\n\r\n\t\tconst date = this.props.viewDate;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t this.props.showView('time') }\r\n\t\t\t\t\t\tcolSpan={7}\r\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\r\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\t_setDate = e => {\r\n\t\tthis.props.updateDate( e );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, day ) {\r\n\treturn rows[ Math.floor( day / 7 ) ];\r\n}\r\n\r\n/**\r\n * Get a list of the days of the week\r\n * depending on the current locale\r\n * @return {array} A list with the shortname of the days\r\n */\r\nfunction getDaysOfWeek( locale ) {\r\n\tconst first = locale.firstDayOfWeek();\r\n\tlet dow = [];\r\n\tlet i = 0;\r\n\r\n\tlocale._weekdaysMin.forEach(function (day) {\r\n\t\tdow[(7 + (i++) - first) % 7] = day;\r\n\t});\r\n\r\n\treturn dow;\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class MonthsView extends React.Component {\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderMonths() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tlet year = this.props.viewDate.year();\r\n\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -1, 'years' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\r\n\t\t\t\tswitchContent={ year }\r\n\t\t\t\tswitchColSpan=\"2\"\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderMonths() {\r\n\t\t// 12 months in 3 rows for every view\r\n\t\tlet rows = [ [], [], [] ];\r\n\r\n\t\tfor ( let month = 0; month < 12; month++ ) {\r\n\t\t\tlet row = getRow( rows, month );\r\n\r\n\t\t\trow.push( this.renderMonth( month ) );\r\n\t\t}\r\n\r\n\t\treturn rows.map( (months, i) => (\r\n\t\t\t{ months }\r\n\t\t));\r\n\t}\r\n\r\n\trenderMonth( month ) {\r\n\t\tconst selectedDate = this.props.selectedDate;\r\n\t\tlet className = 'rdtMonth';\r\n\t\tlet onClick;\r\n\r\n\t\tif ( this.isDisabledMonth( month ) ) {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tonClick = this._updateSelectedMonth;\r\n\t\t}\r\n\r\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\r\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\r\n\r\n\t\tif ( this.props.renderMonth ) {\r\n\t\t\treturn this.props.renderMonth(\r\n\t\t\t\tprops,\r\n\t\t\t\tmonth,\r\n\t\t\t\tthis.props.viewDate.year(),\r\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ this.getMonthText( month ) }\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\t\r\n\tisDisabledMonth( month ) {\r\n\t\tlet isValidDate = this.props.isValidDate;\r\n\r\n\t\tif ( !isValidDate ) {\r\n\t\t\t// If no validator is set, all days are valid\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// If one day in the month is valid, the year should be clickable\r\n\t\tlet date = this.props.viewDate.clone().set({month});\r\n\t\tlet day = date.endOf( 'month' ).date() + 1;\r\n\r\n\t\twhile ( day-- > 1 ) {\r\n\t\t\tif ( isValidDate( date.date(day) ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tgetMonthText( month ) {\r\n\t\tconst localMoment = this.props.viewDate;\r\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\r\n\r\n\t\t// Because some months are up to 5 characters long, we want to\r\n\t\t// use a fixed string length for consistency\r\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\r\n\t}\r\n\r\n\t_updateSelectedMonth = event => {\r\n\t\tthis.props.updateDate( event );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, year ) {\r\n\tif ( year < 4 ) {\r\n\t\treturn rows[0];\r\n\t}\r\n\tif ( year < 8 ) {\r\n\t\treturn rows[1];\r\n\t}\r\n\r\n\treturn rows[2];\r\n}\r\n\r\nfunction capitalize( str ) {\r\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class YearsView extends React.Component {\r\n\tstatic defaultProps = {\r\n\t\trenderYear: ( props, year ) => { year },\r\n\t};\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderYears() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tconst viewYear = this.getViewYear();\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -10, 'years' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\r\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderYears() {\r\n\t\tconst viewYear = this.getViewYear();\r\n\t\t// 12 years in 3 rows for every view\r\n\t\tlet rows = [ [], [], [] ];\r\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\r\n\t\t\tlet row = getRow( rows, year - viewYear );\r\n\r\n\t\t\trow.push(\r\n\t\t\t\tthis.renderYear( year )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn rows.map( (years, i) => (\r\n\t\t\t{ years }\r\n\t\t));\r\n\t}\r\n\r\n\trenderYear( year ) {\r\n\t\tconst selectedYear = this.getSelectedYear();\r\n\t\tlet className = 'rdtYear';\r\n\t\tlet onClick;\r\n\r\n\t\tif ( this.isDisabledYear( year ) ) {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tonClick = this._updateSelectedYear;\r\n\t\t}\r\n\r\n\t\tif ( selectedYear === year ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\r\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\r\n\r\n\t\treturn this.props.renderYear(\r\n\t\t\tprops,\r\n\t\t\tyear,\r\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\r\n\t\t);\r\n\t}\r\n\r\n\tgetViewYear() {\r\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\r\n\t}\r\n\r\n\tgetSelectedYear() {\r\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\r\n\t}\r\n\r\n\tdisabledYearsCache = {};\r\n\tisDisabledYear( year ) {\r\n\t\tlet cache = this.disabledYearsCache;\r\n\t\tif ( cache[year] !== undefined ) {\r\n\t\t\treturn cache[year];\r\n\t\t}\r\n\r\n\t\tlet isValidDate = this.props.isValidDate;\r\n\r\n\t\tif ( !isValidDate ) {\r\n\t\t\t// If no validator is set, all days are valid\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// If one day in the year is valid, the year should be clickable\r\n\t\tlet date = this.props.viewDate.clone().set({year});\r\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\r\n\r\n\t\twhile ( day-- > 1 ) {\r\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\r\n\t\t\t\tcache[year] = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcache[year] = true;\r\n\t\treturn true;\r\n\t}\r\n\r\n\t_updateSelectedYear = event => {\r\n\t\tthis.props.updateDate( event );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, year ) {\r\n\tif ( year < 3 ) {\r\n\t\treturn rows[0];\r\n\t}\r\n\tif ( year < 7 ) {\r\n\t\treturn rows[1];\r\n\t}\r\n\r\n\treturn rows[2];\r\n}\r\n","import React from 'react';\r\n\r\nconst timeConstraints = {\r\n\thours: {\r\n\t\tmin: 0,\r\n\t\tmax: 23,\r\n\t\tstep: 1\r\n\t},\r\n\tminutes: {\r\n\t\tmin: 0,\r\n\t\tmax: 59,\r\n\t\tstep: 1\r\n\t},\r\n\tseconds: {\r\n\t\tmin: 0,\r\n\t\tmax: 59,\r\n\t\tstep: 1\r\n\t},\r\n\tmilliseconds: {\r\n\t\tmin: 0,\r\n\t\tmax: 999,\r\n\t\tstep: 1\r\n\t}\r\n};\r\n\r\nfunction createConstraints( overrideTimeConstraints ) {\r\n\tlet constraints = {};\r\n\r\n\tObject.keys( timeConstraints ).forEach( type => {\r\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\r\n\t});\r\n\r\n\treturn constraints;\r\n}\r\n\r\nexport default class TimeView extends React.Component {\r\n\tconstructor( props ) {\r\n\t\tsuper( props );\r\n\r\n\t\tthis.constraints = createConstraints( props.timeConstraints );\r\n\r\n\t\t// This component buffers the time part values in the state \r\n\t\t// while the user is pressing down the buttons\r\n\t\t// and call the prop `setTime` when the buttons are released\r\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet items = [];\r\n\t\tconst timeParts = this.state;\r\n\t\t\r\n\t\tthis.getCounters().forEach( (c, i) => {\r\n\t\t\tif ( i && c !== 'ampm' ) {\r\n\t\t\t\titems.push(\r\n\t\t\t\t\t
:
\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\r\n\t\t});\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t{ this.renderHeader() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{ items }\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderCounter( type, value ) {\r\n\t\tif ( type === 'hours' && this.isAMPM() ) {\r\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\r\n\r\n\t\t\tif ( value === 0 ) {\r\n\t\t\t\tvalue = 12;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( type === 'ampm' ) {\r\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\r\n\t\t\t\tvalue = this.props.viewDate.format('A');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvalue = this.props.viewDate.format('a');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\r\n\t\t\t\t
{ value }
\r\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderHeader() {\r\n\t\tif ( !this.props.dateFormat ) return;\r\n\r\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t this.props.showView('days') }>\r\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\tonStartClicking( e, action, type ) {\r\n\t\tif ( e && e.button && e.button !== 0 ) {\r\n\t\t\t// Only left clicks, thanks\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\r\n\r\n\t\tlet update = {};\r\n\t\tlet body = document.body;\r\n\t\tupdate[ type ] = this[ action ]( type );\r\n\t\tthis.setState( update );\r\n\r\n\t\tthis.timer = setTimeout( () => {\r\n\t\t\tthis.increaseTimer = setInterval( () => {\r\n\t\t\t\tupdate[ type ] = this[ action ]( type );\r\n\t\t\t\tthis.setState( update );\r\n\t\t\t}, 70);\r\n\t\t}, 500);\r\n\r\n\t\tthis.mouseUpListener = () => {\r\n\t\t\tclearTimeout( this.timer );\r\n\t\t\tclearInterval( this.increaseTimer );\r\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\r\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\r\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\r\n\t\t};\r\n\r\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\r\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\r\n\t}\r\n\r\n\ttoggleDayPart() {\r\n\t\tlet hours = parseInt( this.state.hours, 10 );\r\n\t\t\r\n\t\tif ( hours >= 12 ) {\r\n\t\t\thours -= 12;\r\n\t\t}\r\n\t\telse {\r\n\t\t\thours += 12;\r\n\t\t}\r\n\r\n\t\tthis.props.setTime( 'hours', hours );\r\n\t}\r\n\r\n\tincrease( type ) {\r\n\t\tconst tc = this.constraints[ type ];\r\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\r\n\t\tif ( value > tc.max )\r\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\r\n\t\treturn pad( type, value );\r\n\t}\r\n\r\n\tdecrease( type ) {\r\n\t\tconst tc = this.constraints[ type ];\r\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\r\n\t\tif ( value < tc.min )\r\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\r\n\t\treturn pad( type, value );\r\n\t}\r\n\r\n\tgetCounters() {\r\n\t\tlet counters = [];\r\n\t\tlet format = this.props.timeFormat;\r\n\t\t\r\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\r\n\t\t\tcounters.push('hours');\r\n\t\t\tif ( format.indexOf('m') !== -1 ) {\r\n\t\t\t\tcounters.push('minutes');\r\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\r\n\t\t\t\t\tcounters.push('seconds');\r\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\r\n\t\t\t\t\t\tcounters.push('milliseconds');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( this.isAMPM() ) {\r\n\t\t\tcounters.push('ampm');\r\n\t\t}\r\n\r\n\t\treturn counters;\r\n\t}\r\n\r\n\tisAMPM() {\r\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\r\n\t}\r\n\r\n\tgetTimeParts( date ) {\r\n\t\tconst hours = date.hours();\r\n\r\n\t\treturn {\r\n\t\t\thours: pad( 'hours', hours ),\r\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\r\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\r\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\r\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\r\n\t\t};\r\n\t}\r\n\r\n\tcomponentDidUpdate( prevProps ) {\r\n\t\tif ( this.props.selectedDate ) {\r\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\r\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\r\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction pad( type, value ) {\r\n\tconst padValues = {\r\n\t\thours: 1,\r\n\t\tminutes: 2,\r\n\t\tseconds: 2,\r\n\t\tmilliseconds: 3\r\n\t};\r\n\r\n\tlet str = value + '';\r\n\twhile ( str.length < padValues[ type ] )\r\n\t\tstr = '0' + str;\r\n\treturn str;\r\n}\r\n","var __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");;","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';\r\nimport moment from 'moment';\r\nimport React from 'react';\r\nimport DaysView from './views/DaysView';\r\nimport MonthsView from './views/MonthsView';\r\nimport YearsView from './views/YearsView';\r\nimport TimeView from './views/TimeView';\r\nimport onClickOutside from 'react-onclickoutside';\r\n\r\nconst viewModes = {\r\n\tYEARS: 'years',\r\n\tMONTHS: 'months',\r\n\tDAYS: 'days',\r\n\tTIME: 'time',\r\n};\r\n\r\nconst TYPES = PropTypes;\r\nconst nofn = function () {};\r\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\r\n\r\nexport default class Datetime extends React.Component {\r\n\tstatic propTypes = {\r\n\t\tvalue: datetype,\r\n\t\tinitialValue: datetype,\r\n\t\tinitialViewDate: datetype,\r\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\r\n\t\tonOpen: TYPES.func,\r\n\t\tonClose: TYPES.func,\r\n\t\tonChange: TYPES.func,\r\n\t\tonNavigate: TYPES.func,\r\n\t\tonBeforeNavigate: TYPES.func,\r\n\t\tonNavigateBack: TYPES.func,\r\n\t\tonNavigateForward: TYPES.func,\r\n\t\tupdateOnView: TYPES.string,\r\n\t\tlocale: TYPES.string,\r\n\t\tutc: TYPES.bool,\r\n\t\tdisplayTimeZone: TYPES.string,\r\n\t\tinput: TYPES.bool,\r\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\r\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\r\n\t\tinputProps: TYPES.object,\r\n\t\ttimeConstraints: TYPES.object,\r\n\t\tisValidDate: TYPES.func,\r\n\t\topen: TYPES.bool,\r\n\t\tstrictParsing: TYPES.bool,\r\n\t\tcloseOnSelect: TYPES.bool,\r\n\t\tcloseOnTab: TYPES.bool,\r\n\t\trenderView: TYPES.func,\r\n\t\trenderInput: TYPES.func,\r\n\t\trenderDay: TYPES.func,\r\n\t\trenderMonth: TYPES.func,\r\n\t\trenderYear: TYPES.func,\r\n\t}\r\n\r\n\tstatic defaultProps = {\r\n\t\tonOpen: nofn,\r\n\t\tonClose: nofn,\r\n\t\tonCalendarOpen: nofn,\r\n\t\tonCalendarClose: nofn,\r\n\t\tonChange: nofn,\r\n\t\tonNavigate: nofn,\r\n\t\tonBeforeNavigate: function(next) { return next; }, \r\n\t\tonNavigateBack: nofn,\r\n\t\tonNavigateForward: nofn,\r\n\t\tdateFormat: true,\r\n\t\ttimeFormat: true,\r\n\t\tutc: false,\r\n\t\tclassName: '',\r\n\t\tinput: true,\r\n\t\tinputProps: {},\r\n\t\ttimeConstraints: {},\r\n\t\tisValidDate: function() { return true; },\r\n\t\tstrictParsing: true,\r\n\t\tcloseOnSelect: false,\r\n\t\tcloseOnTab: true,\r\n\t\tcloseOnClickOutside: true,\r\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\r\n\t}\r\n\r\n\t// Make moment accessible through the Datetime class\r\n\tstatic moment = moment;\r\n\r\n\tconstructor( props ) {\r\n\t\tsuper( props );\r\n\t\tthis.state = this.getInitialState();\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ this.renderInput() }\r\n\t\t\t\t
\r\n\t\t\t\t\t{ this.renderView() }\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderInput() {\r\n\t\tif ( !this.props.input ) return;\r\n\r\n\t\tconst finalInputProps = {\r\n\t\t\ttype: 'text',\r\n\t\t\tclassName: 'form-control',\r\n\t\t\tvalue: this.getInputValue(),\r\n\t\t\t...this.props.inputProps,\r\n\t\t\tonFocus: this._onInputFocus,\r\n\t\t\tonChange: this._onInputChange,\r\n\t\t\tonKeyDown: this._onInputKeyDown,\r\n\t\t\tonClick: this._onInputClick\r\n\t\t};\r\n\r\n\t\tif ( this.props.renderInput ) { \r\n\t\t\treturn (\r\n\t\t\t\t
\r\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\r\n\t\t\t\t
\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\trenderView() {\r\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\r\n\t}\r\n\r\n\t_renderCalendar = () => {\r\n\t\tconst props = this.props;\r\n\t\tconst state = this.state;\r\n\r\n\t\tlet viewProps = {\r\n\t\t\tviewDate: state.viewDate.clone(),\r\n\t\t\tselectedDate: this.getSelectedDate(),\r\n\t\t\tisValidDate: props.isValidDate,\r\n\t\t\tupdateDate: this._updateDate,\r\n\t\t\tnavigate: this._viewNavigate,\r\n\t\t\tmoment: moment,\r\n\t\t\tshowView: this._showView\r\n\t\t};\r\n\r\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\r\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\r\n\t\tswitch ( state.currentView ) {\r\n\t\t\tcase viewModes.YEARS:\r\n\t\t\t\t// Used viewProps\r\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\r\n\t\t\t\tviewProps.renderYear = props.renderYear;\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tcase viewModes.MONTHS:\r\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\r\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tcase viewModes.DAYS:\r\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \r\n\t\t\t\tviewProps.renderDay = props.renderDay;\r\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\r\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\r\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\r\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\r\n\t\t\t\tviewProps.setTime = this._setTime;\r\n\t\t\t\treturn ;\r\n\t\t}\r\n\t}\r\n\r\n\tgetInitialState() {\r\n\t\tlet props = this.props;\r\n\t\tlet inputFormat = this.getFormat('datetime');\r\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\r\n\r\n\t\tthis.checkTZ();\r\n\r\n\t\treturn {\r\n\t\t\topen: !props.input,\r\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\r\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\r\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\r\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\r\n\t\t};\r\n\t}\r\n\t\r\n\tgetInitialViewDate( selectedDate ) {\r\n\t\tconst propDate = this.props.initialViewDate;\r\n\t\tlet viewDate;\r\n\t\tif ( propDate ) {\r\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\r\n\t\t\tif ( viewDate && viewDate.isValid() ) {\r\n\t\t\t\treturn viewDate;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\r\n\t\t\treturn selectedDate.clone();\r\n\t\t}\r\n\t\treturn this.getInitialDate();\r\n\t}\r\n\r\n\tgetInitialDate() {\r\n\t\tlet m = this.localMoment();\r\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\r\n\t\treturn m;\r\n\t}\r\n\r\n\tgetInitialView() {\r\n\t\tconst dateFormat = this.getFormat( 'date' );\r\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\r\n\t}\r\n\r\n\tparseDate(date, dateFormat) {\r\n\t\tlet parsedDate;\r\n\r\n\t\tif (date && typeof date === 'string')\r\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\r\n\t\telse if (date)\r\n\t\t\tparsedDate = this.localMoment(date);\r\n\r\n\t\tif (parsedDate && !parsedDate.isValid())\r\n\t\t\tparsedDate = null;\r\n\r\n\t\treturn parsedDate;\r\n\t}\r\n\r\n\tgetClassName() {\r\n\t\tlet cn = 'rdt';\r\n\t\tlet props = this.props;\r\n\t\tlet propCn = props.className;\r\n\r\n\t\tif ( Array.isArray( propCn ) ) {\r\n\t\t\tcn += ' ' + propCn.join(' ');\r\n\t\t}\r\n\t\telse if ( propCn ) {\r\n\t\t\tcn += ' ' + propCn;\r\n\t\t}\r\n\r\n\t\tif ( !props.input ) {\r\n\t\t\tcn += ' rdtStatic';\r\n\t\t}\r\n\t\tif ( this.isOpen() ) {\r\n\t\t\tcn += ' rdtOpen';\r\n\t\t}\r\n\r\n\t\treturn cn;\r\n\t}\r\n\t\r\n\tisOpen() {\r\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\r\n\t}\r\n\r\n\tgetUpdateOn( dateFormat ) {\r\n\t\tif ( this.props.updateOnView ) {\r\n\t\t\treturn this.props.updateOnView;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.match(/[lLD]/) ) {\r\n\t\t\treturn viewModes.DAYS;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\r\n\t\t\treturn viewModes.MONTHS;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\r\n\t\t\treturn viewModes.YEARS;\r\n\t\t}\r\n\r\n\t\treturn viewModes.DAYS;\r\n\t}\r\n\r\n\tgetLocaleData() {\r\n\t\tlet p = this.props;\r\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\r\n\t}\r\n\r\n\tgetDateFormat() {\r\n\t\tconst locale = this.getLocaleData();\r\n\t\tlet format = this.props.dateFormat;\r\n\t\tif ( format === true ) return locale.longDateFormat('L');\r\n\t\tif ( format ) return format;\r\n\t\treturn '';\r\n\t}\r\n\r\n\tgetTimeFormat() {\r\n\t\tconst locale = this.getLocaleData();\r\n\t\tlet format = this.props.timeFormat;\r\n\t\tif ( format === true ) {\r\n\t\t\treturn locale.longDateFormat('LT');\r\n\t\t}\r\n\t\treturn format || '';\r\n\t}\r\n\r\n\tgetFormat( type ) {\r\n\t\tif ( type === 'date' ) {\r\n\t\t\treturn this.getDateFormat();\r\n\t\t}\r\n\t\telse if ( type === 'time' ) {\r\n\t\t\treturn this.getTimeFormat();\r\n\t\t}\r\n\t\t\r\n\t\tlet dateFormat = this.getDateFormat();\r\n\t\tlet timeFormat = this.getTimeFormat();\r\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\r\n\t}\r\n\r\n\t_showView = ( view, date ) => {\r\n\t\tconst d = ( date || this.state.viewDate ).clone();\r\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\r\n\r\n\t\tif ( nextView && this.state.currentView !== nextView ) {\r\n\t\t\tthis.props.onNavigate( nextView );\r\n\t\t\tthis.setState({ currentView: nextView });\r\n\t\t}\r\n\t}\r\n\r\n\tupdateTime( op, amount, type, toSelected ) {\r\n\t\tlet update = {};\r\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\r\n\r\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\r\n\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\r\n\tnextView = { days: 'time', months: 'days', years: 'months'};\r\n\t_updateDate = e => {\r\n\t\tlet state = this.state;\r\n\t\tlet currentView = state.currentView;\r\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\r\n\t\t// Set the value into day/month/year\r\n\t\tviewDate[ this.viewToMethod[currentView] ](\r\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\r\n\t\t);\r\n\r\n\t\t// Need to set month and year will for days view (prev/next month)\r\n\t\tif ( currentView === 'days' ) {\r\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\r\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\r\n\t\t}\r\n\r\n\t\tlet update = {viewDate: viewDate};\r\n\t\tif ( currentView === updateOnView ) {\r\n\t\t\tupdate.selectedDate = viewDate.clone();\r\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\r\n\r\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\r\n\t\t\t\tthis._closeCalendar();\r\n\t\t\t}\r\n\r\n\t\t\tthis.props.onChange( viewDate.clone() );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\r\n\t\t}\r\n\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\t_viewNavigate = ( modifier, unit ) => {\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\t\t\r\n\t\t// Subtracting is just adding negative time\r\n\t\tviewDate.add( modifier, unit );\r\n\r\n\t\tif ( modifier > 0 ) {\r\n\t\t\tthis.props.onNavigateForward( modifier, unit );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\r\n\t\t}\r\n\r\n\t\tthis.setState({viewDate});\r\n\t}\r\n\t\r\n\t_setTime = ( type, value ) => {\r\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\r\n\t\t\r\n\t\tdate[ type ]( value );\r\n\r\n\t\tif ( !this.props.value ) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tselectedDate: date,\r\n\t\t\t\tviewDate: date.clone(),\r\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.props.onChange( date );\r\n\t}\r\n\r\n\t_openCalendar = () => {\r\n\t\tif ( this.isOpen() ) return;\r\n\t\tthis.setState({open: true}, this.props.onOpen );\r\n\t}\r\n\r\n\t_closeCalendar = () => {\r\n\t\tif ( !this.isOpen() ) return;\r\n\r\n\t\tthis.setState({open: false}, () => {\r\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\r\n\t\t});\r\n\t}\r\n\r\n\t_handleClickOutside = () => {\r\n\t\tlet props = this.props;\r\n\r\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\r\n\t\t\tthis._closeCalendar();\r\n\t\t}\r\n\t}\r\n\r\n\tlocalMoment( date, format, props ) {\r\n\t\tprops = props || this.props;\r\n\t\tlet m = null;\r\n\r\n\t\tif (props.utc) {\r\n\t\t\tm = moment.utc(date, format, props.strictParsing);\r\n\t\t} else if (props.displayTimeZone) {\r\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\r\n\t\t} else {\r\n\t\t\tm = moment(date, format, props.strictParsing);\r\n\t\t}\r\n\r\n\t\tif ( props.locale )\r\n\t\t\tm.locale( props.locale );\r\n\t\treturn m;\r\n\t}\r\n\r\n\tcheckTZ() {\r\n\t\tconst { displayTimeZone } = this.props;\r\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\r\n\t\t\tthis.tzWarning = true;\r\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidUpdate( prevProps ) {\r\n\t\tif ( prevProps === this.props ) return;\r\n\r\n\t\tlet needsUpdate = false;\r\n\t\tlet thisProps = this.props;\r\n\r\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\r\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\r\n\t\t});\r\n\r\n\t\tif ( needsUpdate ) {\r\n\t\t\tthis.regenerateDates();\r\n\t\t}\r\n\r\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\r\n\t\t\tthis.setViewDate( thisProps.value );\r\n\t\t}\r\n\r\n\t\tthis.checkTZ();\r\n\t}\r\n\r\n\tregenerateDates() {\r\n\t\tconst props = this.props;\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\r\n\r\n\t\tif ( props.locale ) {\r\n\t\t\tviewDate.locale( props.locale );\r\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\r\n\t\t}\r\n\t\tif ( props.utc ) {\r\n\t\t\tviewDate.utc();\r\n\t\t\tselectedDate &&\tselectedDate.utc();\r\n\t\t}\r\n\t\telse if ( props.displayTimeZone ) {\r\n\t\t\tviewDate.tz( props.displayTimeZone );\r\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tviewDate.locale();\r\n\t\t\tselectedDate &&\tselectedDate.locale();\r\n\t\t}\r\n\r\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\r\n\t\tif ( selectedDate && selectedDate.isValid() ) {\r\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\r\n\t\t}\r\n\t\t\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\tgetSelectedDate() {\r\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\r\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\r\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\r\n\t}\r\n\r\n\tgetInitialInputValue( selectedDate ) {\r\n\t\tconst props = this.props;\r\n\t\tif ( props.inputProps.value )\r\n\t\t\treturn props.inputProps.value;\r\n\t\t\r\n\t\tif ( selectedDate && selectedDate.isValid() )\r\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\r\n\t\t\r\n\t\tif ( props.value && typeof props.value === 'string' )\r\n\t\t\treturn props.value;\r\n\t\t\r\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\r\n\t\t\treturn props.initialValue;\r\n\t\t\r\n\t\treturn '';\r\n\t}\r\n\r\n\tgetInputValue() {\r\n\t\tlet selectedDate = this.getSelectedDate();\r\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the date that is currently shown in the calendar.\r\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\r\n\t * @param dateType date\r\n\t * @public\r\n\t */\r\n\tsetViewDate( date ) {\r\n\t\tlet me = this;\r\n\t\tlet logError = function() {\r\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\r\n\t\t};\r\n\r\n\t\tif ( !date ) return logError();\r\n\t\t\r\n\t\tlet viewDate;\r\n\t\tif ( typeof date === 'string' ) {\r\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tviewDate = this.localMoment( date );\r\n\t\t}\r\n\r\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\r\n\t\tthis.setState({ viewDate: viewDate });\r\n\t}\r\n\r\n\t/**\r\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\r\n\t * @param TYPES.string mode \r\n\t */\r\n\tnavigate( mode ) {\r\n\t\tthis._showView( mode );\r\n\t}\r\n\r\n\t_onInputFocus = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\r\n\t\tthis._openCalendar();\r\n\t}\r\n\r\n\t_onInputChange = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\r\n\r\n\t\tconst value = e.target ? e.target.value : e;\r\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\r\n\t\tlet update = { inputValue: value };\r\n\r\n\t\tif ( localMoment.isValid() ) {\r\n\t\t\tupdate.selectedDate = localMoment;\r\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\r\n\t\t}\r\n\t\telse {\r\n\t\t\tupdate.selectedDate = null;\r\n\t\t}\r\n\r\n\t\tthis.setState( update, () => {\r\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\r\n\t\t});\r\n\t}\r\n\r\n\t_onInputKeyDown = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\r\n\r\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\r\n\t\t\tthis._closeCalendar();\r\n\t\t}\r\n\t}\r\n\r\n\t_onInputClick = e => {\r\n\t\t// Focus event should open the calendar, but there is some case where\r\n\t\t// the input is already focused and the picker is closed, so clicking the input\r\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\r\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\r\n\t\tthis._openCalendar();\r\n\t}\r\n\r\n\tcallHandler( method, e ) {\r\n\t\tif ( !method ) return true;\r\n\t\treturn method(e) !== false;\r\n\t}\r\n}\r\n\r\nfunction log( message, method ) {\r\n\tlet con = typeof window !== 'undefined' && window.console;\r\n\tif ( !con ) return;\r\n\r\n\tif ( !method ) {\r\n\t\tmethod = 'warn';\r\n\t}\r\n\tcon[ method ]( '***react-datetime:' + message );\r\n}\r\n\r\nclass ClickOutBase extends React.Component {\r\n\tcontainer = React.createRef();\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t{ this.props.children }\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\thandleClickOutside(e) {\r\n\t\tthis.props.onClickOut( e );\r\n\t}\r\n\r\n\tsetClickOutsideRef() {\r\n\t\treturn this.container.current;\r\n\t}\r\n}\r\n\r\nconst ClickableWrapper = onClickOutside( ClickOutBase );\r\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 = 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\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","/**\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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(628);\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-datetime.umd.js b/dist/react-datetime.umd.js index 53422efc6..4c72fcd3c 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;return(t=n.localeData().monthsShort(n.month(e)).substring(0,3)).charAt(0).toUpperCase()+t.slice(1)}}])&&k(t.prototype,n),a}(c().Component);function V(e,t){return t<4?e[0]:t<8?e[1]:e[2]}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),a}(c().Component);function A(e,t){return t<3?e[0]:t<7?e[1]:e[2]}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){for(var n=0;n=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))),J(e,n)}},{key:"decrease",value:function(e){var t=this.constraints[e],n=parseInt(this.state[e],10)-t.step;return n0?r.props.onNavigateForward(e,t):r.props.onNavigateBack(-e,t),r.setState({viewDate:n})})),ge(ve(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)})),ge(ve(r),"_openCalendar",(function(){r.isOpen()||r.setState({open:!0},r.props.onOpen)})),ge(ve(r),"_closeCalendar",(function(){r.isOpen()&&r.setState({open:!1},(function(){r.props.onClose(r.state.selectedDate||r.state.inputValue)}))})),ge(ve(r),"_handleClickOutside",(function(){var e=r.props;e.input&&r.state.open&&void 0===e.open&&e.closeOnClickOutside&&r._closeCalendar()})),ge(ve(r),"_onInputFocus",(function(e){r.callHandler(r.props.inputProps.onFocus,e)&&r._openCalendar()})),ge(ve(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)}))}})),ge(ve(r),"_onInputKeyDown",(function(e){r.callHandler(r.props.inputProps.onKeyDown,e)&&9===e.which&&r.props.closeOnTab&&r._closeCalendar()})),ge(ve(r),"_onInputClick",(function(e){r.callHandler(r.props.inputProps.onClick,e)&&r._openCalendar()})),r.state=r.getInitialState(),r}return fe(n,[{key:"render",value:function(){return c().createElement(Fe,{className:this.getClassName(),onClickOut:this._handleClickOutside},this.renderInput(),c().createElement("div",{className:"rdtPicker"},this.renderView()))}},{key:"renderInput",value:function(){if(this.props.input){var e=ue(ue({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().createElement("div",null,this.props.renderInput(e,this._openCalendar,this._closeCalendar)):c().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;Se('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):ke}},{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]/)?De:-1!==e.indexOf("M")?Oe:-1!==e.indexOf("Y")?we:De}},{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={},i=r?"selectedDate":"viewDate";o[i]=this.state[i].clone()[e](t,n),this.setState(o)}},{key:"localMoment",value:function(e,t,n){var r=null;return r=(n=n||this.props).utc?a().utc(e,t,n.strictParsing):n.displayTimeZone?a().tz(e,t,n.displayTimeZone):a()(e,t,n.strictParsing),n.locale&&r.locale(n.locale),r}},{key:"checkTZ",value:function(){var e=this.props.displayTimeZone;!e||this.tzWarning||a().tz||(this.tzWarning=!0,Se('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;return e&&(t="string"==typeof e?this.localMoment(e,this.getFormat("datetime")):this.localMoment(e))&&t.isValid()?void this.setState({viewDate:t}):n.log("Invalid date passed to the `setViewDate` method: "+e)}},{key:"navigate",value:function(e){this._showView(e)}},{key:"callHandler",value:function(e,t){return!e||!1!==e(t)}}]),n}(c().Component);function Se(e,t){var n="undefined"!=typeof window&&window.console;n&&(t||(t="warn"),n[t]("***react-datetime:"+e))}ge(Pe,"propTypes",{value:Ee,initialValue:Ee,initialViewDate:Ee,initialViewMode:Ce.oneOf([we,Oe,De,ke]),onOpen:Ce.func,onClose:Ce.func,onChange:Ce.func,onNavigate:Ce.func,onBeforeNavigate:Ce.func,onNavigateBack:Ce.func,onNavigateForward:Ce.func,updateOnView:Ce.string,locale:Ce.string,utc:Ce.bool,displayTimeZone:Ce.string,input:Ce.bool,dateFormat:Ce.oneOfType([Ce.string,Ce.bool]),timeFormat:Ce.oneOfType([Ce.string,Ce.bool]),inputProps:Ce.object,timeConstraints:Ce.object,isValidDate:Ce.func,open:Ce.bool,strictParsing:Ce.bool,closeOnSelect:Ce.bool,closeOnTab:Ce.bool,renderView:Ce.func,renderInput:Ce.func,renderDay:Ce.func,renderMonth:Ce.func,renderYear:Ce.func}),ge(Pe,"defaultProps",{onOpen:_e,onClose:_e,onCalendarOpen:_e,onCalendarClose:_e,onChange:_e,onNavigate:_e,onBeforeNavigate:function(e){return e},onNavigateBack:_e,onNavigateForward:_e,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()}}),ge(Pe,"moment",a());var je,Ve,Te,Ne,xe,Fe=(je=function(e){de(n,e);var t=me(n);function n(){var e;le(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["excludeScrollbar"]));return je.prototype.isReactComponent?t.ref=this.getRef:t.wrappedRef=this.getRef,t.disableOnClickOutside=this.disableOnClickOutside,t.enableOnClickOutside=this.enableOnClickOutside,(0,s.createElement)(je,t)},r}(s.Component),Te.displayName="OnClickOutside("+xe+")",Te.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:Ve&&Ve.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},Te.getClass=function(){return je.getClass?je.getClass():je},Ne)},703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==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:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},470:function(t){"use strict";t.exports=e},297:function(e){"use strict";e.exports=t},268:function(e){"use strict";e.exports=n}},o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={exports:{}};return r[e](t,t.exports,i),t.exports}return i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i(246)}().default})); //# sourceMappingURL=react-datetime.umd.js.map \ No newline at end of file diff --git a/dist/react-datetime.umd.js.map b/dist/react-datetime.umd.js.map index 005c83c20..956552fec 100644 --- a/dist/react-datetime.umd.js.map +++ b/dist/react-datetime.umd.js.map @@ -1 +1 @@ -{"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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F,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","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 +{"version":3,"sources":["webpack://Datetime/webpack/universalModuleDefinition","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","webpack://Datetime/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://Datetime/./node_modules/prop-types/index.js","webpack://Datetime/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://Datetime/external \"moment\"","webpack://Datetime/external \"react\"","webpack://Datetime/external \"react-dom\"","webpack://Datetime/webpack/bootstrap","webpack://Datetime/webpack/startup","webpack://Datetime/webpack/runtime/compat get default export","webpack://Datetime/webpack/runtime/define property getters","webpack://Datetime/webpack/runtime/hasOwnProperty shorthand"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__470__","__WEBPACK_EXTERNAL_MODULE__297__","__WEBPACK_EXTERNAL_MODULE__268__","ViewNavigation","onClickPrev","onClickSwitch","onClickNext","switchContent","switchColSpan","switchProps","className","onClick","colSpan","DaysView","e","props","updateDate","this","renderNavigation","renderDayHeaders","renderDays","renderFooter","date","viewDate","locale","localeData","navigate","showView","months","year","month","first","dow","i","dayItems","firstDayOfWeek","_weekdaysMin","forEach","day","map","index","key","startOfMonth","clone","startOf","endOfMonth","endOf","rows","startDate","subtract","daysInMonth","endDate","add","isBefore","getRow","push","renderDay","r","selectedDate","dayProps","format","isAfter","isSame","moment","isValidDate","_setDate","timeFormat","React","Math","floor","MonthsView","event","renderMonths","renderMonth","isDisabledMonth","_updateSelectedMonth","getMonthText","set","str","localMoment","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","Object","keys","type","state","getTimeParts","items","timeParts","getCounters","c","renderCounter","renderHeader","value","isAMPM","indexOf","onMouseDown","onStartClicking","dateFormat","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","viewModes","TYPES","PropTypes","nofn","datetype","oneOfType","instanceOf","Date","string","Datetime","viewProps","getSelectedDate","_updateDate","_viewNavigate","_showView","currentView","getFormat","_setTime","view","d","nextView","onBeforeNavigate","onNavigate","days","updateOnView","getUpdateOn","viewToMethod","target","getAttribute","inputValue","open","input","closeOnSelect","_closeCalendar","onChange","modifier","unit","onNavigateForward","onNavigateBack","isOpen","onOpen","onClose","closeOnClickOutside","callHandler","inputProps","onFocus","_openCalendar","isValid","onKeyDown","which","closeOnTab","getInitialState","ClickableWrapper","getClassName","onClickOut","_handleClickOutside","renderInput","renderView","finalInputProps","getInputValue","_onInputFocus","_onInputChange","_onInputKeyDown","_onInputClick","_renderCalendar","inputFormat","parseDate","initialValue","checkTZ","initialViewMode","getInitialView","getInitialViewDate","getInitialInputValue","propDate","initialViewDate","log","getInitialDate","m","hour","minute","second","millisecond","parsedDate","cn","propCn","Array","isArray","join","match","p","defaultValue","getLocaleData","longDateFormat","getDateFormat","getTimeFormat","op","amount","toSelected","utc","strictParsing","displayTimeZone","tzWarning","needsUpdate","thisProps","regenerateDates","setViewDate","tz","me","mode","method","message","con","window","console","oneOf","func","bool","object","onCalendarOpen","onCalendarClose","next","_","renderFunc","WrappedComponent","config","_class","_temp","componentName","ref","container","children","displayName","name","_Component","subClass","superClass","onClickOutside","_this","call","__outsideClickHandler","__clickOutsideHandlerProp","getInstance","handleClickOutside","Error","__getComponentNode","setClickOutsideRef","findDOMNode","enableOnClickOutside","_uid","options","defineProperty","get","noop","testPassiveEventSupport","events","eventTypes","evt","stopPropagation","excludeScrollbar","documentElement","clientWidth","clientX","clientHeight","clientY","parentNode","findHighest","outsideClickIgnoreClass","disableOnClickOutside","fn","getRef","instanceRef","prototype","create","constructor","__proto__","_proto","isReactComponent","componentDidMount","createElement","componentDidUpdate","componentWillUnmount","render","_props","source","excluded","sourceKeys","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutProperties","wrappedRef","Component","defaultProps","getClass","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","array","number","symbol","any","arrayOf","element","elementType","node","objectOf","shape","exact","checkPropTypes","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","n","getter","__esModule","a","definition","o","enumerable","obj","prop","hasOwnProperty"],"mappings":"CAAA,SAA2CA,EAAMC,GAE1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UAAWA,QAAQ,SAAUA,QAAQ,cAE7C,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,SAAU,QAAS,aAAcJ,GAEf,iBAAZC,QACdA,QAAkB,SAAID,EAAQG,QAAQ,UAAWA,QAAQ,SAAUA,QAAQ,cAG3EJ,EAAe,SAAIC,EAAQD,EAAa,OAAGA,EAAY,MAAGA,EAAK,cAZjE,CAaGO,MAAM,SAASC,EAAkCC,EAAkCC,GACtF,O,mWCZe,SAASC,EAAT,GAAkH,IAAvFC,EAAuF,EAAvFA,YAAaC,EAA0E,EAA1EA,cAAeC,EAA2D,EAA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AChBC,kBAAmBF,GAKrB,OAFAW,EAAe5M,UAAY4M,EAEpBA,I,oBC7CP/X,EAAOD,QAAU,EAAQ,IAAR,I,6BCNnBC,EAAOD,QAFoB,gD,6BCT3BC,EAAOD,QAAUM,G,6BCAjBL,EAAOD,QAAUO,G,6BCAjBN,EAAOD,QAAUQ,ICCbqY,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAU/Y,QAG3C,IAAIC,EAAS4Y,EAAyBE,GAAY,CAGjD/Y,QAAS,IAOV,OAHAgZ,EAAoBD,GAAU9Y,EAAQA,EAAOD,QAAS8Y,GAG/C7Y,EAAOD,QCjBf,OCFA8Y,EAAoBG,EAAI,SAAShZ,GAChC,IAAIiZ,EAASjZ,GAAUA,EAAOkZ,WAC7B,WAAa,OAAOlZ,EAAgB,SACpC,WAAa,OAAOA,GAErB,OADA6Y,EAAoBzM,EAAE6M,EAAQ,CAAEE,EAAGF,IAC5BA,GCLRJ,EAAoBzM,EAAI,SAASrM,EAASqZ,GACzC,IAAI,IAAItW,KAAOsW,EACXP,EAAoBQ,EAAED,EAAYtW,KAAS+V,EAAoBQ,EAAEtZ,EAAS+C,IAC5EsE,OAAOmN,eAAexU,EAAS+C,EAAK,CAAEwW,YAAY,EAAM9E,IAAK4E,EAAWtW,MCJ3E+V,EAAoBQ,EAAI,SAASE,EAAKC,GAAQ,OAAOpS,OAAOwO,UAAU6D,eAAe9F,KAAK4F,EAAKC,IHGxFX,EAAoB,K","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(\"moment\"), require(\"react\"), require(\"react-dom\"));\n\t//React datetime\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"moment\", \"react\", \"react-dom\"], factory);\n\t//React datetime\n\telse if(typeof exports === 'object')\n\t\texports[\"Datetime\"] = factory(require(\"moment\"), require(\"react\"), require(\"react-dom\"));\n\t//React datetime\n\telse\n\t\troot[\"Datetime\"] = factory(root[\"moment\"], root[\"react\"], root[\"react-dom\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE__470__, __WEBPACK_EXTERNAL_MODULE__297__, __WEBPACK_EXTERNAL_MODULE__268__) {\nreturn ","import React from 'react';\r\n\r\nexport default function ViewNavigation( { onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps } ) {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t{ switchContent }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class DaysView extends React.Component {\r\n\tstatic defaultProps = {\r\n\t\tisValidDate: () => true,\r\n\t\trenderDay: ( props, date ) => { date.date() },\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\t{ this.renderDayHeaders() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderDays() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t{ this.renderFooter() }\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tconst date = this.props.viewDate;\r\n\t\tconst locale = date.localeData();\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -1, 'months' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'months' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'months' ) }\r\n\t\t\t\tswitchContent={ locale.months( date ) + ' ' + date.year() }\r\n\t\t\t\tswitchColSpan={5}\r\n\t\t\t\tswitchProps={ { 'data-value': this.props.viewDate.month() } }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderDayHeaders() {\r\n\t\tconst locale = this.props.viewDate.localeData();\r\n\t\tlet dayItems = getDaysOfWeek( locale ).map( (day, index) => (\r\n\t\t\t{ day }\r\n\t\t));\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ dayItems }\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\trenderDays() {\r\n\t\tconst date = this.props.viewDate;\r\n\t\tconst startOfMonth = date.clone().startOf('month');\r\n\t\tconst endOfMonth = date.clone().endOf('month');\r\n\r\n\t\t// We need 42 days in 6 rows\r\n\t\t// starting in the last week of the previous month\r\n\t\tlet rows = [[], [], [], [], [], []];\r\n\r\n\t\tlet startDate = date.clone().subtract( 1, 'months');\r\n\t\tstartDate.date( startDate.daysInMonth() ).startOf('week');\r\n\r\n\t\tlet endDate = startDate.clone().add( 42, 'd' );\r\n\t\tlet i = 0;\r\n\r\n\t\twhile ( startDate.isBefore( endDate ) ) {\r\n\t\t\tlet row = getRow( rows, i++ );\r\n\t\t\trow.push( this.renderDay( startDate, startOfMonth, endOfMonth ) );\r\n\t\t\tstartDate.add( 1, 'd' );\r\n\t\t}\r\n\r\n\t\treturn rows.map( (r, i) => (\r\n\t\t\t{ r }\r\n\t\t));\r\n\t}\r\n\r\n\trenderDay( date, startOfMonth, endOfMonth ) {\r\n\t\tlet selectedDate = this.props.selectedDate;\r\n\r\n\t\tlet dayProps = {\r\n\t\t\tkey: date.format('M_D'),\r\n\t\t\t'data-value': date.date(),\r\n\t\t\t'data-month': date.month(),\r\n\t\t\t'data-year': date.year()\r\n\t\t};\r\n\r\n\t\tlet className = 'rdtDay';\r\n\t\tif ( date.isBefore( startOfMonth ) ) {\r\n\t\t\tclassName += ' rdtOld';\r\n\t\t}\r\n\t\telse if ( date.isAfter( endOfMonth ) ) {\r\n\t\t\tclassName += ' rdtNew';\r\n\t\t}\r\n\t\tif ( selectedDate && date.isSame( selectedDate, 'day' ) ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\t\tif ( date.isSame( this.props.moment(), 'day' ) ) {\r\n\t\t\tclassName += ' rdtToday';\r\n\t\t}\r\n\r\n\t\tif ( this.props.isValidDate(date) ) {\r\n\t\t\tdayProps.onClick = this._setDate;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\r\n\t\tdayProps.className = className;\r\n\r\n\t\treturn this.props.renderDay(\r\n\t\t\tdayProps, date.clone(), selectedDate && selectedDate.clone()\r\n\t\t);\r\n\t}\r\n\r\n\trenderFooter() {\r\n\t\tif ( !this.props.timeFormat ) return;\r\n\r\n\t\tconst date = this.props.viewDate;\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t this.props.showView('time') }\r\n\t\t\t\t\t\tcolSpan={7}\r\n\t\t\t\t\t\tclassName=\"rdtTimeToggle\">\r\n\t\t\t\t\t\t{ date.format( this.props.timeFormat ) }\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\t_setDate = e => {\r\n\t\tthis.props.updateDate( e );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, day ) {\r\n\treturn rows[ Math.floor( day / 7 ) ];\r\n}\r\n\r\n/**\r\n * Get a list of the days of the week\r\n * depending on the current locale\r\n * @return {array} A list with the shortname of the days\r\n */\r\nfunction getDaysOfWeek( locale ) {\r\n\tconst first = locale.firstDayOfWeek();\r\n\tlet dow = [];\r\n\tlet i = 0;\r\n\r\n\tlocale._weekdaysMin.forEach(function (day) {\r\n\t\tdow[(7 + (i++) - first) % 7] = day;\r\n\t});\r\n\r\n\treturn dow;\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class MonthsView extends React.Component {\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderMonths() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tlet year = this.props.viewDate.year();\r\n\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -1, 'years' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 1, 'years' ) }\r\n\t\t\t\tswitchContent={ year }\r\n\t\t\t\tswitchColSpan=\"2\"\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderMonths() {\r\n\t\t// 12 months in 3 rows for every view\r\n\t\tlet rows = [ [], [], [] ];\r\n\r\n\t\tfor ( let month = 0; month < 12; month++ ) {\r\n\t\t\tlet row = getRow( rows, month );\r\n\r\n\t\t\trow.push( this.renderMonth( month ) );\r\n\t\t}\r\n\r\n\t\treturn rows.map( (months, i) => (\r\n\t\t\t{ months }\r\n\t\t));\r\n\t}\r\n\r\n\trenderMonth( month ) {\r\n\t\tconst selectedDate = this.props.selectedDate;\r\n\t\tlet className = 'rdtMonth';\r\n\t\tlet onClick;\r\n\r\n\t\tif ( this.isDisabledMonth( month ) ) {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tonClick = this._updateSelectedMonth;\r\n\t\t}\r\n\r\n\t\tif ( selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\r\n\t\tlet props = {key: month, className, 'data-value': month, onClick };\r\n\r\n\t\tif ( this.props.renderMonth ) {\r\n\t\t\treturn this.props.renderMonth(\r\n\t\t\t\tprops,\r\n\t\t\t\tmonth,\r\n\t\t\t\tthis.props.viewDate.year(),\r\n\t\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ this.getMonthText( month ) }\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\t\r\n\tisDisabledMonth( month ) {\r\n\t\tlet isValidDate = this.props.isValidDate;\r\n\r\n\t\tif ( !isValidDate ) {\r\n\t\t\t// If no validator is set, all days are valid\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// If one day in the month is valid, the year should be clickable\r\n\t\tlet date = this.props.viewDate.clone().set({month});\r\n\t\tlet day = date.endOf( 'month' ).date() + 1;\r\n\r\n\t\twhile ( day-- > 1 ) {\r\n\t\t\tif ( isValidDate( date.date(day) ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\tgetMonthText( month ) {\r\n\t\tconst localMoment = this.props.viewDate;\r\n\t\tconst monthStr = localMoment.localeData().monthsShort( localMoment.month( month ) );\r\n\r\n\t\t// Because some months are up to 5 characters long, we want to\r\n\t\t// use a fixed string length for consistency\r\n\t\treturn capitalize( monthStr.substring( 0, 3 ) );\r\n\t}\r\n\r\n\t_updateSelectedMonth = event => {\r\n\t\tthis.props.updateDate( event );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, year ) {\r\n\tif ( year < 4 ) {\r\n\t\treturn rows[0];\r\n\t}\r\n\tif ( year < 8 ) {\r\n\t\treturn rows[1];\r\n\t}\r\n\r\n\treturn rows[2];\r\n}\r\n\r\nfunction capitalize( str ) {\r\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\r\n}\r\n","import React from 'react';\r\nimport ViewNavigation from '../parts/ViewNavigation';\r\n\r\nexport default class YearsView extends React.Component {\r\n\tstatic defaultProps = {\r\n\t\trenderYear: ( props, year ) => { year },\r\n\t};\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderNavigation() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{ this.renderYears() }\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderNavigation() {\r\n\t\tconst viewYear = this.getViewYear();\r\n\t\treturn (\r\n\t\t\t this.props.navigate( -10, 'years' ) }\r\n\t\t\t\tonClickSwitch={ () => this.props.showView( 'years' ) }\r\n\t\t\t\tonClickNext={ () => this.props.navigate( 10, 'years' ) }\r\n\t\t\t\tswitchContent={ `${viewYear}-${viewYear + 9}` }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\trenderYears() {\r\n\t\tconst viewYear = this.getViewYear();\r\n\t\t// 12 years in 3 rows for every view\r\n\t\tlet rows = [ [], [], [] ];\r\n\t\tfor ( let year = viewYear - 1; year < viewYear + 11; year++ ) {\r\n\t\t\tlet row = getRow( rows, year - viewYear );\r\n\r\n\t\t\trow.push(\r\n\t\t\t\tthis.renderYear( year )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn rows.map( (years, i) => (\r\n\t\t\t{ years }\r\n\t\t));\r\n\t}\r\n\r\n\trenderYear( year ) {\r\n\t\tconst selectedYear = this.getSelectedYear();\r\n\t\tlet className = 'rdtYear';\r\n\t\tlet onClick;\r\n\r\n\t\tif ( this.isDisabledYear( year ) ) {\r\n\t\t\tclassName += ' rdtDisabled';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tonClick = this._updateSelectedYear;\r\n\t\t}\r\n\r\n\t\tif ( selectedYear === year ) {\r\n\t\t\tclassName += ' rdtActive';\r\n\t\t}\r\n\r\n\t\tlet props = {key: year, className, 'data-value': year, onClick };\r\n\r\n\t\treturn this.props.renderYear(\r\n\t\t\tprops,\r\n\t\t\tyear,\r\n\t\t\tthis.props.selectedDate && this.props.selectedDate.clone()\r\n\t\t);\r\n\t}\r\n\r\n\tgetViewYear() {\r\n\t\treturn parseInt( this.props.viewDate.year() / 10, 10 ) * 10;\r\n\t}\r\n\r\n\tgetSelectedYear() {\r\n\t\treturn this.props.selectedDate && this.props.selectedDate.year();\r\n\t}\r\n\r\n\tdisabledYearsCache = {};\r\n\tisDisabledYear( year ) {\r\n\t\tlet cache = this.disabledYearsCache;\r\n\t\tif ( cache[year] !== undefined ) {\r\n\t\t\treturn cache[year];\r\n\t\t}\r\n\r\n\t\tlet isValidDate = this.props.isValidDate;\r\n\r\n\t\tif ( !isValidDate ) {\r\n\t\t\t// If no validator is set, all days are valid\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// If one day in the year is valid, the year should be clickable\r\n\t\tlet date = this.props.viewDate.clone().set({year});\r\n\t\tlet day = date.endOf( 'year' ).dayOfYear() + 1;\r\n\r\n\t\twhile ( day-- > 1 ) {\r\n\t\t\tif ( isValidDate( date.dayOfYear(day) ) ) {\r\n\t\t\t\tcache[year] = false;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcache[year] = true;\r\n\t\treturn true;\r\n\t}\r\n\r\n\t_updateSelectedYear = event => {\r\n\t\tthis.props.updateDate( event );\r\n\t}\r\n}\r\n\r\nfunction getRow( rows, year ) {\r\n\tif ( year < 3 ) {\r\n\t\treturn rows[0];\r\n\t}\r\n\tif ( year < 7 ) {\r\n\t\treturn rows[1];\r\n\t}\r\n\r\n\treturn rows[2];\r\n}\r\n","import React from 'react';\r\n\r\nconst timeConstraints = {\r\n\thours: {\r\n\t\tmin: 0,\r\n\t\tmax: 23,\r\n\t\tstep: 1\r\n\t},\r\n\tminutes: {\r\n\t\tmin: 0,\r\n\t\tmax: 59,\r\n\t\tstep: 1\r\n\t},\r\n\tseconds: {\r\n\t\tmin: 0,\r\n\t\tmax: 59,\r\n\t\tstep: 1\r\n\t},\r\n\tmilliseconds: {\r\n\t\tmin: 0,\r\n\t\tmax: 999,\r\n\t\tstep: 1\r\n\t}\r\n};\r\n\r\nfunction createConstraints( overrideTimeConstraints ) {\r\n\tlet constraints = {};\r\n\r\n\tObject.keys( timeConstraints ).forEach( type => {\r\n\t\tconstraints[ type ] = { ...timeConstraints[type], ...(overrideTimeConstraints[type] || {}) };\r\n\t});\r\n\r\n\treturn constraints;\r\n}\r\n\r\nexport default class TimeView extends React.Component {\r\n\tconstructor( props ) {\r\n\t\tsuper( props );\r\n\r\n\t\tthis.constraints = createConstraints( props.timeConstraints );\r\n\r\n\t\t// This component buffers the time part values in the state \r\n\t\t// while the user is pressing down the buttons\r\n\t\t// and call the prop `setTime` when the buttons are released\r\n\t\tthis.state = this.getTimeParts( props.selectedDate || props.viewDate );\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet items = [];\r\n\t\tconst timeParts = this.state;\r\n\t\t\r\n\t\tthis.getCounters().forEach( (c, i) => {\r\n\t\t\tif ( i && c !== 'ampm' ) {\r\n\t\t\t\titems.push(\r\n\t\t\t\t\t
:
\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\titems.push( this.renderCounter(c, timeParts[c]) );\r\n\t\t});\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t{ this.renderHeader() }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\t\t{ items }\r\n\t\t\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderCounter( type, value ) {\r\n\t\tif ( type === 'hours' && this.isAMPM() ) {\r\n\t\t\tvalue = ( value - 1 ) % 12 + 1;\r\n\r\n\t\t\tif ( value === 0 ) {\r\n\t\t\t\tvalue = 12;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( type === 'ampm' ) {\r\n\t\t\tif ( this.props.timeFormat.indexOf(' A') !== -1 ) {\r\n\t\t\t\tvalue = this.props.viewDate.format('A');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvalue = this.props.viewDate.format('a');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t this.onStartClicking( e, 'increase', type)}>▲\r\n\t\t\t\t
{ value }
\r\n\t\t\t\t this.onStartClicking( e, 'decrease', type)}>▼\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderHeader() {\r\n\t\tif ( !this.props.dateFormat ) return;\r\n\r\n\t\tconst date = this.props.selectedDate || this.props.viewDate;\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t this.props.showView('days') }>\r\n\t\t\t\t\t\t{ date.format( this.props.dateFormat ) }\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\tonStartClicking( e, action, type ) {\r\n\t\tif ( e && e.button && e.button !== 0 ) {\r\n\t\t\t// Only left clicks, thanks\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( type === 'ampm' ) return this.toggleDayPart();\r\n\r\n\t\tlet update = {};\r\n\t\tlet body = document.body;\r\n\t\tupdate[ type ] = this[ action ]( type );\r\n\t\tthis.setState( update );\r\n\r\n\t\tthis.timer = setTimeout( () => {\r\n\t\t\tthis.increaseTimer = setInterval( () => {\r\n\t\t\t\tupdate[ type ] = this[ action ]( type );\r\n\t\t\t\tthis.setState( update );\r\n\t\t\t}, 70);\r\n\t\t}, 500);\r\n\r\n\t\tthis.mouseUpListener = () => {\r\n\t\t\tclearTimeout( this.timer );\r\n\t\t\tclearInterval( this.increaseTimer );\r\n\t\t\tthis.props.setTime( type, parseInt( this.state[ type ], 10 ) );\r\n\t\t\tbody.removeEventListener( 'mouseup', this.mouseUpListener );\r\n\t\t\tbody.removeEventListener( 'touchend', this.mouseUpListener );\r\n\t\t};\r\n\r\n\t\tbody.addEventListener( 'mouseup', this.mouseUpListener );\r\n\t\tbody.addEventListener( 'touchend', this.mouseUpListener );\r\n\t}\r\n\r\n\ttoggleDayPart() {\r\n\t\tlet hours = parseInt( this.state.hours, 10 );\r\n\t\t\r\n\t\tif ( hours >= 12 ) {\r\n\t\t\thours -= 12;\r\n\t\t}\r\n\t\telse {\r\n\t\t\thours += 12;\r\n\t\t}\r\n\r\n\t\tthis.props.setTime( 'hours', hours );\r\n\t}\r\n\r\n\tincrease( type ) {\r\n\t\tconst tc = this.constraints[ type ];\r\n\t\tlet value = parseInt( this.state[ type ], 10) + tc.step;\r\n\t\tif ( value > tc.max )\r\n\t\t\tvalue = tc.min + ( value - ( tc.max + 1 ) );\r\n\t\treturn pad( type, value );\r\n\t}\r\n\r\n\tdecrease( type ) {\r\n\t\tconst tc = this.constraints[ type ];\r\n\t\tlet value = parseInt( this.state[ type ], 10) - tc.step;\r\n\t\tif ( value < tc.min )\r\n\t\t\tvalue = tc.max + 1 - ( tc.min - value );\r\n\t\treturn pad( type, value );\r\n\t}\r\n\r\n\tgetCounters() {\r\n\t\tlet counters = [];\r\n\t\tlet format = this.props.timeFormat;\r\n\t\t\r\n\t\tif ( format.toLowerCase().indexOf('h') !== -1 ) {\r\n\t\t\tcounters.push('hours');\r\n\t\t\tif ( format.indexOf('m') !== -1 ) {\r\n\t\t\t\tcounters.push('minutes');\r\n\t\t\t\tif ( format.indexOf('s') !== -1 ) {\r\n\t\t\t\t\tcounters.push('seconds');\r\n\t\t\t\t\tif ( format.indexOf('S') !== -1 ) {\r\n\t\t\t\t\t\tcounters.push('milliseconds');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( this.isAMPM() ) {\r\n\t\t\tcounters.push('ampm');\r\n\t\t}\r\n\r\n\t\treturn counters;\r\n\t}\r\n\r\n\tisAMPM() {\r\n\t\treturn this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1;\r\n\t}\r\n\r\n\tgetTimeParts( date ) {\r\n\t\tconst hours = date.hours();\r\n\r\n\t\treturn {\r\n\t\t\thours: pad( 'hours', hours ),\r\n\t\t\tminutes: pad( 'minutes', date.minutes() ),\r\n\t\t\tseconds: pad( 'seconds', date.seconds() ),\r\n\t\t\tmilliseconds: pad('milliseconds', date.milliseconds() ),\r\n\t\t\tampm: hours < 12 ? 'am' : 'pm'\r\n\t\t};\r\n\t}\r\n\r\n\tcomponentDidUpdate( prevProps ) {\r\n\t\tif ( this.props.selectedDate ) {\r\n\t\t\tif ( this.props.selectedDate !== prevProps.selectedDate ) {\r\n\t\t\t\tthis.setState( this.getTimeParts( this.props.selectedDate ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( prevProps.viewDate !== this.props.viewDate ) {\r\n\t\t\tthis.setState( this.getTimeParts( this.props.viewDate ) );\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction pad( type, value ) {\r\n\tconst padValues = {\r\n\t\thours: 1,\r\n\t\tminutes: 2,\r\n\t\tseconds: 2,\r\n\t\tmilliseconds: 3\r\n\t};\r\n\r\n\tlet str = value + '';\r\n\twhile ( str.length < padValues[ type ] )\r\n\t\tstr = '0' + str;\r\n\treturn str;\r\n}\r\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';\r\nimport moment from 'moment';\r\nimport React from 'react';\r\nimport DaysView from './views/DaysView';\r\nimport MonthsView from './views/MonthsView';\r\nimport YearsView from './views/YearsView';\r\nimport TimeView from './views/TimeView';\r\nimport onClickOutside from 'react-onclickoutside';\r\n\r\nconst viewModes = {\r\n\tYEARS: 'years',\r\n\tMONTHS: 'months',\r\n\tDAYS: 'days',\r\n\tTIME: 'time',\r\n};\r\n\r\nconst TYPES = PropTypes;\r\nconst nofn = function () {};\r\nconst datetype = TYPES.oneOfType([ TYPES.instanceOf(moment), TYPES.instanceOf(Date), TYPES.string ]);\r\n\r\nexport default class Datetime extends React.Component {\r\n\tstatic propTypes = {\r\n\t\tvalue: datetype,\r\n\t\tinitialValue: datetype,\r\n\t\tinitialViewDate: datetype,\r\n\t\tinitialViewMode: TYPES.oneOf([viewModes.YEARS, viewModes.MONTHS, viewModes.DAYS, viewModes.TIME]),\r\n\t\tonOpen: TYPES.func,\r\n\t\tonClose: TYPES.func,\r\n\t\tonChange: TYPES.func,\r\n\t\tonNavigate: TYPES.func,\r\n\t\tonBeforeNavigate: TYPES.func,\r\n\t\tonNavigateBack: TYPES.func,\r\n\t\tonNavigateForward: TYPES.func,\r\n\t\tupdateOnView: TYPES.string,\r\n\t\tlocale: TYPES.string,\r\n\t\tutc: TYPES.bool,\r\n\t\tdisplayTimeZone: TYPES.string,\r\n\t\tinput: TYPES.bool,\r\n\t\tdateFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\r\n\t\ttimeFormat: TYPES.oneOfType([TYPES.string, TYPES.bool]),\r\n\t\tinputProps: TYPES.object,\r\n\t\ttimeConstraints: TYPES.object,\r\n\t\tisValidDate: TYPES.func,\r\n\t\topen: TYPES.bool,\r\n\t\tstrictParsing: TYPES.bool,\r\n\t\tcloseOnSelect: TYPES.bool,\r\n\t\tcloseOnTab: TYPES.bool,\r\n\t\trenderView: TYPES.func,\r\n\t\trenderInput: TYPES.func,\r\n\t\trenderDay: TYPES.func,\r\n\t\trenderMonth: TYPES.func,\r\n\t\trenderYear: TYPES.func,\r\n\t}\r\n\r\n\tstatic defaultProps = {\r\n\t\tonOpen: nofn,\r\n\t\tonClose: nofn,\r\n\t\tonCalendarOpen: nofn,\r\n\t\tonCalendarClose: nofn,\r\n\t\tonChange: nofn,\r\n\t\tonNavigate: nofn,\r\n\t\tonBeforeNavigate: function(next) { return next; }, \r\n\t\tonNavigateBack: nofn,\r\n\t\tonNavigateForward: nofn,\r\n\t\tdateFormat: true,\r\n\t\ttimeFormat: true,\r\n\t\tutc: false,\r\n\t\tclassName: '',\r\n\t\tinput: true,\r\n\t\tinputProps: {},\r\n\t\ttimeConstraints: {},\r\n\t\tisValidDate: function() { return true; },\r\n\t\tstrictParsing: true,\r\n\t\tcloseOnSelect: false,\r\n\t\tcloseOnTab: true,\r\n\t\tcloseOnClickOutside: true,\r\n\t\trenderView: ( _, renderFunc ) => renderFunc(),\r\n\t}\r\n\r\n\t// Make moment accessible through the Datetime class\r\n\tstatic moment = moment;\r\n\r\n\tconstructor( props ) {\r\n\t\tsuper( props );\r\n\t\tthis.state = this.getInitialState();\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{ this.renderInput() }\r\n\t\t\t\t
\r\n\t\t\t\t\t{ this.renderView() }\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\r\n\trenderInput() {\r\n\t\tif ( !this.props.input ) return;\r\n\r\n\t\tconst finalInputProps = {\r\n\t\t\ttype: 'text',\r\n\t\t\tclassName: 'form-control',\r\n\t\t\tvalue: this.getInputValue(),\r\n\t\t\t...this.props.inputProps,\r\n\t\t\tonFocus: this._onInputFocus,\r\n\t\t\tonChange: this._onInputChange,\r\n\t\t\tonKeyDown: this._onInputKeyDown,\r\n\t\t\tonClick: this._onInputClick\r\n\t\t};\r\n\r\n\t\tif ( this.props.renderInput ) { \r\n\t\t\treturn (\r\n\t\t\t\t
\r\n\t\t\t\t\t{ this.props.renderInput( finalInputProps, this._openCalendar, this._closeCalendar ) }\r\n\t\t\t\t
\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n\r\n\trenderView() {\r\n\t\treturn this.props.renderView( this.state.currentView, this._renderCalendar );\r\n\t}\r\n\r\n\t_renderCalendar = () => {\r\n\t\tconst props = this.props;\r\n\t\tconst state = this.state;\r\n\r\n\t\tlet viewProps = {\r\n\t\t\tviewDate: state.viewDate.clone(),\r\n\t\t\tselectedDate: this.getSelectedDate(),\r\n\t\t\tisValidDate: props.isValidDate,\r\n\t\t\tupdateDate: this._updateDate,\r\n\t\t\tnavigate: this._viewNavigate,\r\n\t\t\tmoment: moment,\r\n\t\t\tshowView: this._showView\r\n\t\t};\r\n\r\n\t\t// Probably updateOn, updateSelectedDate and setDate can be merged in the same method\r\n\t\t// that would update viewDate or selectedDate depending on the view and the dateFormat\r\n\t\tswitch ( state.currentView ) {\r\n\t\t\tcase viewModes.YEARS:\r\n\t\t\t\t// Used viewProps\r\n\t\t\t\t// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }\r\n\t\t\t\tviewProps.renderYear = props.renderYear;\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tcase viewModes.MONTHS:\r\n\t\t\t\t// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }\r\n\t\t\t\tviewProps.renderMonth = props.renderMonth;\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tcase viewModes.DAYS:\r\n\t\t\t\t// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat \r\n\t\t\t\tviewProps.renderDay = props.renderDay;\r\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\r\n\t\t\t\treturn ;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\t// { viewDate, selectedDate, timeFormat, dateFormat, timeConstraints, setTime, showView }\r\n\t\t\t\tviewProps.dateFormat = this.getFormat('date');\r\n\t\t\t\tviewProps.timeFormat = this.getFormat('time');\r\n\t\t\t\tviewProps.timeConstraints = props.timeConstraints;\r\n\t\t\t\tviewProps.setTime = this._setTime;\r\n\t\t\t\treturn ;\r\n\t\t}\r\n\t}\r\n\r\n\tgetInitialState() {\r\n\t\tlet props = this.props;\r\n\t\tlet inputFormat = this.getFormat('datetime');\r\n\t\tlet selectedDate = this.parseDate( props.value || props.initialValue, inputFormat );\r\n\r\n\t\tthis.checkTZ();\r\n\r\n\t\treturn {\r\n\t\t\topen: !props.input,\r\n\t\t\tcurrentView: props.initialViewMode || this.getInitialView(),\r\n\t\t\tviewDate: this.getInitialViewDate( selectedDate ),\r\n\t\t\tselectedDate: selectedDate && selectedDate.isValid() ? selectedDate : undefined,\r\n\t\t\tinputValue: this.getInitialInputValue( selectedDate )\r\n\t\t};\r\n\t}\r\n\t\r\n\tgetInitialViewDate( selectedDate ) {\r\n\t\tconst propDate = this.props.initialViewDate;\r\n\t\tlet viewDate;\r\n\t\tif ( propDate ) {\r\n\t\t\tviewDate = this.parseDate( propDate, this.getFormat('datetime') );\r\n\t\t\tif ( viewDate && viewDate.isValid() ) {\r\n\t\t\t\treturn viewDate;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlog('The initialViewDated given \"' + propDate + '\" is not valid. Using current date instead.');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( selectedDate && selectedDate.isValid() ) {\r\n\t\t\treturn selectedDate.clone();\r\n\t\t}\r\n\t\treturn this.getInitialDate();\r\n\t}\r\n\r\n\tgetInitialDate() {\r\n\t\tlet m = this.localMoment();\r\n\t\tm.hour(0).minute(0).second(0).millisecond(0);\r\n\t\treturn m;\r\n\t}\r\n\r\n\tgetInitialView() {\r\n\t\tconst dateFormat = this.getFormat( 'date' );\r\n\t\treturn dateFormat ? this.getUpdateOn( dateFormat ) : viewModes.TIME;\r\n\t}\r\n\r\n\tparseDate(date, dateFormat) {\r\n\t\tlet parsedDate;\r\n\r\n\t\tif (date && typeof date === 'string')\r\n\t\t\tparsedDate = this.localMoment(date, dateFormat);\r\n\t\telse if (date)\r\n\t\t\tparsedDate = this.localMoment(date);\r\n\r\n\t\tif (parsedDate && !parsedDate.isValid())\r\n\t\t\tparsedDate = null;\r\n\r\n\t\treturn parsedDate;\r\n\t}\r\n\r\n\tgetClassName() {\r\n\t\tlet cn = 'rdt';\r\n\t\tlet props = this.props;\r\n\t\tlet propCn = props.className;\r\n\r\n\t\tif ( Array.isArray( propCn ) ) {\r\n\t\t\tcn += ' ' + propCn.join(' ');\r\n\t\t}\r\n\t\telse if ( propCn ) {\r\n\t\t\tcn += ' ' + propCn;\r\n\t\t}\r\n\r\n\t\tif ( !props.input ) {\r\n\t\t\tcn += ' rdtStatic';\r\n\t\t}\r\n\t\tif ( this.isOpen() ) {\r\n\t\t\tcn += ' rdtOpen';\r\n\t\t}\r\n\r\n\t\treturn cn;\r\n\t}\r\n\t\r\n\tisOpen() {\r\n\t\treturn !this.props.input || (this.props.open === undefined ? this.state.open : this.props.open);\r\n\t}\r\n\r\n\tgetUpdateOn( dateFormat ) {\r\n\t\tif ( this.props.updateOnView ) {\r\n\t\t\treturn this.props.updateOnView;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.match(/[lLD]/) ) {\r\n\t\t\treturn viewModes.DAYS;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.indexOf('M') !== -1 ) {\r\n\t\t\treturn viewModes.MONTHS;\r\n\t\t}\r\n\r\n\t\tif ( dateFormat.indexOf('Y') !== -1 ) {\r\n\t\t\treturn viewModes.YEARS;\r\n\t\t}\r\n\r\n\t\treturn viewModes.DAYS;\r\n\t}\r\n\r\n\tgetLocaleData() {\r\n\t\tlet p = this.props;\r\n\t\treturn this.localMoment( p.value || p.defaultValue || new Date() ).localeData();\r\n\t}\r\n\r\n\tgetDateFormat() {\r\n\t\tconst locale = this.getLocaleData();\r\n\t\tlet format = this.props.dateFormat;\r\n\t\tif ( format === true ) return locale.longDateFormat('L');\r\n\t\tif ( format ) return format;\r\n\t\treturn '';\r\n\t}\r\n\r\n\tgetTimeFormat() {\r\n\t\tconst locale = this.getLocaleData();\r\n\t\tlet format = this.props.timeFormat;\r\n\t\tif ( format === true ) {\r\n\t\t\treturn locale.longDateFormat('LT');\r\n\t\t}\r\n\t\treturn format || '';\r\n\t}\r\n\r\n\tgetFormat( type ) {\r\n\t\tif ( type === 'date' ) {\r\n\t\t\treturn this.getDateFormat();\r\n\t\t}\r\n\t\telse if ( type === 'time' ) {\r\n\t\t\treturn this.getTimeFormat();\r\n\t\t}\r\n\t\t\r\n\t\tlet dateFormat = this.getDateFormat();\r\n\t\tlet timeFormat = this.getTimeFormat();\r\n\t\treturn dateFormat && timeFormat ? dateFormat + ' ' + timeFormat : (dateFormat || timeFormat );\r\n\t}\r\n\r\n\t_showView = ( view, date ) => {\r\n\t\tconst d = ( date || this.state.viewDate ).clone();\r\n\t\tconst nextView = this.props.onBeforeNavigate( view, this.state.currentView, d );\r\n\r\n\t\tif ( nextView && this.state.currentView !== nextView ) {\r\n\t\t\tthis.props.onNavigate( nextView );\r\n\t\t\tthis.setState({ currentView: nextView });\r\n\t\t}\r\n\t}\r\n\r\n\tupdateTime( op, amount, type, toSelected ) {\r\n\t\tlet update = {};\r\n\t\tconst date = toSelected ? 'selectedDate' : 'viewDate';\r\n\r\n\t\tupdate[ date ] = this.state[ date ].clone()[ op ]( amount, type );\r\n\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\tviewToMethod = {days: 'date', months: 'month', years: 'year'};\r\n\tnextView = { days: 'time', months: 'days', years: 'months'};\r\n\t_updateDate = e => {\r\n\t\tlet state = this.state;\r\n\t\tlet currentView = state.currentView;\r\n\t\tlet updateOnView = this.getUpdateOn( this.getFormat('date') );\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\r\n\t\t// Set the value into day/month/year\r\n\t\tviewDate[ this.viewToMethod[currentView] ](\r\n\t\t\tparseInt( e.target.getAttribute('data-value'), 10 )\r\n\t\t);\r\n\r\n\t\t// Need to set month and year will for days view (prev/next month)\r\n\t\tif ( currentView === 'days' ) {\r\n\t\t\tviewDate.month( parseInt( e.target.getAttribute('data-month'), 10 ) );\r\n\t\t\tviewDate.year( parseInt( e.target.getAttribute('data-year'), 10 ) );\r\n\t\t}\r\n\r\n\t\tlet update = {viewDate: viewDate};\r\n\t\tif ( currentView === updateOnView ) {\r\n\t\t\tupdate.selectedDate = viewDate.clone();\r\n\t\t\tupdate.inputValue = viewDate.format( this.getFormat('datetime') );\r\n\r\n\t\t\tif ( this.props.open === undefined && this.props.input && this.props.closeOnSelect ) {\r\n\t\t\t\tthis._closeCalendar();\r\n\t\t\t}\r\n\r\n\t\t\tthis.props.onChange( viewDate.clone() );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis._showView( this.nextView[ currentView ], viewDate );\r\n\t\t}\r\n\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\t_viewNavigate = ( modifier, unit ) => {\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\t\t\r\n\t\t// Subtracting is just adding negative time\r\n\t\tviewDate.add( modifier, unit );\r\n\r\n\t\tif ( modifier > 0 ) {\r\n\t\t\tthis.props.onNavigateForward( modifier, unit );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.props.onNavigateBack( -(modifier), unit );\r\n\t\t}\r\n\r\n\t\tthis.setState({viewDate});\r\n\t}\r\n\t\r\n\t_setTime = ( type, value ) => {\r\n\t\tlet date = (this.getSelectedDate() || this.state.viewDate).clone();\r\n\t\t\r\n\t\tdate[ type ]( value );\r\n\r\n\t\tif ( !this.props.value ) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tselectedDate: date,\r\n\t\t\t\tviewDate: date.clone(),\r\n\t\t\t\tinputValue: date.format( this.getFormat('datetime') )\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.props.onChange( date );\r\n\t}\r\n\r\n\t_openCalendar = () => {\r\n\t\tif ( this.isOpen() ) return;\r\n\t\tthis.setState({open: true}, this.props.onOpen );\r\n\t}\r\n\r\n\t_closeCalendar = () => {\r\n\t\tif ( !this.isOpen() ) return;\r\n\r\n\t\tthis.setState({open: false}, () => {\r\n\t\t\t this.props.onClose( this.state.selectedDate || this.state.inputValue );\r\n\t\t});\r\n\t}\r\n\r\n\t_handleClickOutside = () => {\r\n\t\tlet props = this.props;\r\n\r\n\t\tif ( props.input && this.state.open && props.open === undefined && props.closeOnClickOutside ) {\r\n\t\t\tthis._closeCalendar();\r\n\t\t}\r\n\t}\r\n\r\n\tlocalMoment( date, format, props ) {\r\n\t\tprops = props || this.props;\r\n\t\tlet m = null;\r\n\r\n\t\tif (props.utc) {\r\n\t\t\tm = moment.utc(date, format, props.strictParsing);\r\n\t\t} else if (props.displayTimeZone) {\r\n\t\t\tm = moment.tz(date, format, props.displayTimeZone);\r\n\t\t} else {\r\n\t\t\tm = moment(date, format, props.strictParsing);\r\n\t\t}\r\n\r\n\t\tif ( props.locale )\r\n\t\t\tm.locale( props.locale );\r\n\t\treturn m;\r\n\t}\r\n\r\n\tcheckTZ() {\r\n\t\tconst { displayTimeZone } = this.props;\r\n\t\tif ( displayTimeZone && !this.tzWarning && !moment.tz ) {\r\n\t\t\tthis.tzWarning = true;\r\n\t\t\tlog('displayTimeZone prop with value \"' + displayTimeZone + '\" is used but moment.js timezone is not loaded.', 'error');\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidUpdate( prevProps ) {\r\n\t\tif ( prevProps === this.props ) return;\r\n\r\n\t\tlet needsUpdate = false;\r\n\t\tlet thisProps = this.props;\r\n\r\n\t\t['locale', 'utc', 'displayZone', 'dateFormat', 'timeFormat'].forEach( function(p) {\r\n\t\t\tprevProps[p] !== thisProps[p] && (needsUpdate = true);\r\n\t\t});\r\n\r\n\t\tif ( needsUpdate ) {\r\n\t\t\tthis.regenerateDates();\r\n\t\t}\r\n\r\n\t\tif ( thisProps.value && thisProps.value !== prevProps.value ) {\r\n\t\t\tthis.setViewDate( thisProps.value );\r\n\t\t}\r\n\r\n\t\tthis.checkTZ();\r\n\t}\r\n\r\n\tregenerateDates() {\r\n\t\tconst props = this.props;\r\n\t\tlet viewDate = this.state.viewDate.clone();\r\n\t\tlet selectedDate = this.state.selectedDate && this.state.selectedDate.clone();\r\n\r\n\t\tif ( props.locale ) {\r\n\t\t\tviewDate.locale( props.locale );\r\n\t\t\tselectedDate &&\tselectedDate.locale( props.locale );\r\n\t\t}\r\n\t\tif ( props.utc ) {\r\n\t\t\tviewDate.utc();\r\n\t\t\tselectedDate &&\tselectedDate.utc();\r\n\t\t}\r\n\t\telse if ( props.displayTimeZone ) {\r\n\t\t\tviewDate.tz( props.displayTimeZone );\r\n\t\t\tselectedDate &&\tselectedDate.tz( props.displayTimeZone );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tviewDate.locale();\r\n\t\t\tselectedDate &&\tselectedDate.locale();\r\n\t\t}\r\n\r\n\t\tlet update = { viewDate: viewDate, selectedDate: selectedDate};\r\n\t\tif ( selectedDate && selectedDate.isValid() ) {\r\n\t\t\tupdate.inputValue = selectedDate.format( this.getFormat('datetime') );\r\n\t\t}\r\n\t\t\r\n\t\tthis.setState( update );\r\n\t}\r\n\r\n\tgetSelectedDate() {\r\n\t\tif ( this.props.value === undefined ) return this.state.selectedDate;\r\n\t\tlet selectedDate = this.parseDate( this.props.value, this.getFormat('datetime') );\r\n\t\treturn selectedDate && selectedDate.isValid() ? selectedDate : false;\r\n\t}\r\n\r\n\tgetInitialInputValue( selectedDate ) {\r\n\t\tconst props = this.props;\r\n\t\tif ( props.inputProps.value )\r\n\t\t\treturn props.inputProps.value;\r\n\t\t\r\n\t\tif ( selectedDate && selectedDate.isValid() )\r\n\t\t\treturn selectedDate.format( this.getFormat('datetime') );\r\n\t\t\r\n\t\tif ( props.value && typeof props.value === 'string' )\r\n\t\t\treturn props.value;\r\n\t\t\r\n\t\tif ( props.initialValue && typeof props.initialValue === 'string' )\r\n\t\t\treturn props.initialValue;\r\n\t\t\r\n\t\treturn '';\r\n\t}\r\n\r\n\tgetInputValue() {\r\n\t\tlet selectedDate = this.getSelectedDate();\r\n\t\treturn selectedDate ? selectedDate.format( this.getFormat('datetime') ) : this.state.inputValue;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the date that is currently shown in the calendar.\r\n\t * This is independent from the selected date and it's the one used to navigate through months or days in the calendar.\r\n\t * @param dateType date\r\n\t * @public\r\n\t */\r\n\tsetViewDate( date ) {\r\n\t\tlet me = this;\r\n\t\tlet logError = function() {\r\n\t\t\treturn me.log( 'Invalid date passed to the `setViewDate` method: ' + date );\r\n\t\t};\r\n\r\n\t\tif ( !date ) return logError();\r\n\t\t\r\n\t\tlet viewDate;\r\n\t\tif ( typeof date === 'string' ) {\r\n\t\t\tviewDate = this.localMoment(date, this.getFormat('datetime') );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tviewDate = this.localMoment( date );\r\n\t\t}\r\n\r\n\t\tif ( !viewDate || !viewDate.isValid() ) return logError();\r\n\t\tthis.setState({ viewDate: viewDate });\r\n\t}\r\n\r\n\t/**\r\n\t * Set the view currently shown by the calendar. View modes shipped with react-datetime are 'years', 'months', 'days' and 'time'.\r\n\t * @param TYPES.string mode \r\n\t */\r\n\tnavigate( mode ) {\r\n\t\tthis._showView( mode );\r\n\t}\r\n\r\n\t_onInputFocus = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onFocus, e ) ) return;\r\n\t\tthis._openCalendar();\r\n\t}\r\n\r\n\t_onInputChange = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onChange, e ) ) return;\r\n\r\n\t\tconst value = e.target ? e.target.value : e;\r\n\t\tconst localMoment = this.localMoment( value, this.getFormat('datetime') );\r\n\t\tlet update = { inputValue: value };\r\n\r\n\t\tif ( localMoment.isValid() ) {\r\n\t\t\tupdate.selectedDate = localMoment;\r\n\t\t\tupdate.viewDate = localMoment.clone().startOf('month');\r\n\t\t}\r\n\t\telse {\r\n\t\t\tupdate.selectedDate = null;\r\n\t\t}\r\n\r\n\t\tthis.setState( update, () => {\r\n\t\t\tthis.props.onChange( localMoment.isValid() ? localMoment : this.state.inputValue );\r\n\t\t});\r\n\t}\r\n\r\n\t_onInputKeyDown = e => {\r\n\t\tif ( !this.callHandler( this.props.inputProps.onKeyDown, e ) ) return;\r\n\r\n\t\tif ( e.which === 9 && this.props.closeOnTab ) {\r\n\t\t\tthis._closeCalendar();\r\n\t\t}\r\n\t}\r\n\r\n\t_onInputClick = e => {\r\n\t\t// Focus event should open the calendar, but there is some case where\r\n\t\t// the input is already focused and the picker is closed, so clicking the input\r\n\t\t// should open it again see https://github.com/arqex/react-datetime/issues/717\r\n\t\tif ( !this.callHandler( this.props.inputProps.onClick, e ) ) return;\r\n\t\tthis._openCalendar();\r\n\t}\r\n\r\n\tcallHandler( method, e ) {\r\n\t\tif ( !method ) return true;\r\n\t\treturn method(e) !== false;\r\n\t}\r\n}\r\n\r\nfunction log( message, method ) {\r\n\tlet con = typeof window !== 'undefined' && window.console;\r\n\tif ( !con ) return;\r\n\r\n\tif ( !method ) {\r\n\t\tmethod = 'warn';\r\n\t}\r\n\tcon[ method ]( '***react-datetime:' + message );\r\n}\r\n\r\nclass ClickOutBase extends React.Component {\r\n\tcontainer = React.createRef();\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t{ this.props.children }\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n\thandleClickOutside(e) {\r\n\t\tthis.props.onClickOut( e );\r\n\t}\r\n\r\n\tsetClickOutsideRef() {\r\n\t\treturn this.container.current;\r\n\t}\r\n}\r\n\r\nconst ClickableWrapper = onClickOutside( ClickOutBase );\r\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 = 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\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","/**\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","module.exports = __WEBPACK_EXTERNAL_MODULE__470__;","module.exports = __WEBPACK_EXTERNAL_MODULE__297__;","module.exports = __WEBPACK_EXTERNAL_MODULE__268__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(246);\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }"],"sourceRoot":""} \ No newline at end of file