Simon Egersand
2017-04-08 7d7b99e7dd32e2609c1e5461d80113759d63fd9f
1
2
3
4
5
6
7
/*
react-datetime v2.8.9
https://github.com/YouCanBookMe/react-datetime
MIT: https://github.com/YouCanBookMe/react-datetime/raw/master/LICENSE
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("moment"),require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["moment","React","ReactDOM"],e):"object"==typeof exports?exports.Datetime=e(require("moment"),require("React"),require("ReactDOM")):t.Datetime=e(t.moment,t.React,t.ReactDOM)}(this,function(t,e,s){return function(t){function e(n){if(s[n])return s[n].exports;var i=s[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){"use strict";var n=s(1),i=s(2),a=s(3),r=s(4),o=a.PropTypes,c=a.createClass({propTypes:{onFocus:o.func,onBlur:o.func,onChange:o.func,locale:o.string,utc:o.bool,input:o.bool,inputProps:o.object,timeConstraints:o.object,viewMode:o.oneOf(["years","months","days","time"]),isValidDate:o.func,open:o.bool,strictParsing:o.bool,closeOnSelect:o.bool,closeOnTab:o.bool},getDefaultProps:function(){var t=function(){};return{className:"",defaultValue:"",inputProps:{},input:!0,onFocus:t,onBlur:t,onChange:t,timeFormat:!0,timeConstraints:{},dateFormat:!0,strictParsing:!0,closeOnSelect:!1,closeOnTab:!0,utc:!1}},getInitialState:function(){var t=this.getStateFromProps(this.props);return void 0===t.open&&(t.open=!this.props.input),t.currentView=this.props.dateFormat?this.props.viewMode||t.updateOn||"days":"time",t},getStateFromProps:function(t){var e,s,n,i,a=this.getFormats(t),r=t.value||t.defaultValue;return r&&"string"==typeof r?e=this.localMoment(r,a.datetime):r&&(e=this.localMoment(r)),e&&!e.isValid()&&(e=null),s=e?e.clone().startOf("month"):this.localMoment().startOf("month"),n=this.getUpdateOn(a),i=e?e.format(a.datetime):r.isValid&&!r.isValid()?"":r||"",{updateOn:n,inputFormat:a.datetime,viewDate:s,selectedDate:e,inputValue:i,open:t.open}},getUpdateOn:function(t){return t.date.match(/[lLD]/)?"days":t.date.indexOf("M")!==-1?"months":t.date.indexOf("Y")!==-1?"years":"days"},getFormats:function(t){var e={date:t.dateFormat||"",time:t.timeFormat||""},s=this.localMoment(t.date,null,t).localeData();return e.date===!0?e.date=s.longDateFormat("L"):"days"!==this.getUpdateOn(e)&&(e.time=""),e.time===!0&&(e.time=s.longDateFormat("LT")),e.datetime=e.date&&e.time?e.date+" "+e.time:e.date||e.time,e},componentWillReceiveProps:function(t){var e=this.getFormats(t),s={};if(t.value===this.props.value&&e.datetime===this.getFormats(this.props).datetime||(s=this.getStateFromProps(t)),void 0===s.open&&(this.props.closeOnSelect&&"time"!==this.state.currentView?s.open=!1:s.open=this.state.open),t.viewMode!==this.props.viewMode&&(s.currentView=t.viewMode),t.locale!==this.props.locale){if(this.state.viewDate){var n=this.state.viewDate.clone().locale(t.locale);s.viewDate=n}if(this.state.selectedDate){var i=this.state.selectedDate.clone().locale(t.locale);s.selectedDate=i,s.inputValue=i.format(e.datetime)}}t.utc!==this.props.utc&&(t.utc?(this.state.viewDate&&(s.viewDate=this.state.viewDate.clone().utc()),this.state.selectedDate&&(s.selectedDate=this.state.selectedDate.clone().utc(),s.inputValue=s.selectedDate.format(e.datetime))):(this.state.viewDate&&(s.viewDate=this.state.viewDate.clone().local()),this.state.selectedDate&&(s.selectedDate=this.state.selectedDate.clone().local(),s.inputValue=s.selectedDate.format(e.datetime)))),this.setState(s)},onInputChange:function(t){var e=null===t.target?t:t.target.value,s=this.localMoment(e,this.state.inputFormat),n={inputValue:e};return s.isValid()&&!this.props.value?(n.selectedDate=s,n.viewDate=s.clone().startOf("month")):n.selectedDate=null,this.setState(n,function(){return this.props.onChange(s.isValid()?s:this.state.inputValue)})},onInputKey:function(t){9===t.which&&this.props.closeOnTab&&this.closeCalendar()},showView:function(t){var e=this;return function(){e.setState({currentView:t})}},setDate:function(t){var e=this,s={month:"days",year:"months"};return function(n){e.setState({viewDate:e.state.viewDate.clone()[t](parseInt(n.target.getAttribute("data-value"),10)).startOf(t),currentView:s[t]})}},addTime:function(t,e,s){return this.updateTime("add",t,e,s)},subtractTime:function(t,e,s){return this.updateTime("subtract",t,e,s)},updateTime:function(t,e,s,n){var i=this;return function(){var a={},r=n?"selectedDate":"viewDate";a[r]=i.state[r].clone()[t](e,s),i.setState(a)}},allowedSetTime:["hours","minutes","seconds","milliseconds"],setTime:function(t,e){var s,n=this.allowedSetTime.indexOf(t)+1,i=this.state,a=(i.selectedDate||i.viewDate).clone();for(a[t](e);n<this.allowedSetTime.length;n++)s=this.allowedSetTime[n],a[s](a[s]());this.props.value||this.setState({selectedDate:a,inputValue:a.format(i.inputFormat)}),this.props.onChange(a)},updateSelectedDate:function(t,e){var s,n=t.target,i=0,a=this.state.viewDate,r=this.state.selectedDate||a;if(n.className.indexOf("rdtDay")!==-1?(n.className.indexOf("rdtNew")!==-1?i=1:n.className.indexOf("rdtOld")!==-1&&(i=-1),s=a.clone().month(a.month()+i).date(parseInt(n.getAttribute("data-value"),10))):n.className.indexOf("rdtMonth")!==-1?s=a.clone().month(parseInt(n.getAttribute("data-value"),10)).date(r.date()):n.className.indexOf("rdtYear")!==-1&&(s=a.clone().month(r.month()).date(r.date()).year(parseInt(n.getAttribute("data-value"),10))),s.hours(r.hours()).minutes(r.minutes()).seconds(r.seconds()).milliseconds(r.milliseconds()),this.props.value)this.props.closeOnSelect&&e&&this.closeCalendar();else{var o=!(this.props.closeOnSelect&&e);o||this.props.onBlur(s),this.setState({selectedDate:s,viewDate:s.clone().startOf("month"),inputValue:s.format(this.state.inputFormat),open:o})}this.props.onChange(s)},openCalendar:function(){this.state.open||this.setState({open:!0},function(){this.props.onFocus()})},closeCalendar:function(){this.setState({open:!1},function(){this.props.onBlur(this.state.selectedDate||this.state.inputValue)})},handleClickOutside:function(){this.props.input&&this.state.open&&!this.props.open&&this.setState({open:!1},function(){this.props.onBlur(this.state.selectedDate||this.state.inputValue)})},localMoment:function(t,e,s){s=s||this.props;var n=s.utc?i.utc:i,a=n(t,e,s.strictParsing);return s.locale&&a.locale(s.locale),a},componentProps:{fromProps:["value","isValidDate","renderDay","renderMonth","renderYear","timeConstraints"],fromState:["viewDate","selectedDate","updateOn"],fromThis:["setDate","setTime","showView","addTime","subtractTime","updateSelectedDate","localMoment","handleClickOutside"]},getComponentProps:function(){var t=this,e=this.getFormats(this.props),s={dateFormat:e.date,timeFormat:e.time};return this.componentProps.fromProps.forEach(function(e){s[e]=t.props[e]}),this.componentProps.fromState.forEach(function(e){s[e]=t.state[e]}),this.componentProps.fromThis.forEach(function(e){s[e]=t[e]}),s},render:function(){var t=a.DOM,e="rdt"+(this.props.className?Array.isArray(this.props.className)?" "+this.props.className.join(" "):" "+this.props.className:""),s=[];return this.props.input?s=[t.input(n({key:"i",type:"text",className:"form-control",onFocus:this.openCalendar,onChange:this.onInputChange,onKeyDown:this.onInputKey,value:this.state.inputValue},this.props.inputProps))]:e+=" rdtStatic",this.state.open&&(e+=" rdtOpen"),t.div({className:e},s.concat(t.div({key:"dt",className:"rdtPicker"},a.createElement(r,{view:this.state.currentView,viewProps:this.getComponentProps(),onClickOutside:this.handleClickOutside}))))}});c.moment=i,t.exports=c},function(t,e){"use strict";function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(t){var e=Object.getOwnPropertyNames(t);return Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t))),e.filter(function(e){return i.call(t,e)})}var i=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(t,e){for(var i,a,r=s(t),o=1;o<arguments.length;o++){i=arguments[o],a=n(Object(i));for(var c=0;c<a.length;c++)r[a[c]]=i[a[c]]}return r}},function(e,s){e.exports=t},function(t,s){t.exports=e},function(t,e,s){var n=s(3),i=s(5),a=s(8),r=s(9),o=s(10),c=n.createClass({viewComponents:{days:i,months:a,years:r,time:o},render:function(){return n.createElement(this.viewComponents[this.props.view],this.props.viewProps)}});t.exports=c},function(t,e,s){"use strict";var n=s(3),i=s(2),a=s(6),r=n.DOM,o=a(n.createClass({render:function(){var t,e=this.renderFooter(),s=this.props.viewDate,n=s.localeData();return t=[r.thead({key:"th"},[r.tr({key:"h"},[r.th({key:"p",className:"rdtPrev"},r.span({onClick:this.props.subtractTime(1,"months")},"‹")),r.th({key:"s",className:"rdtSwitch",onClick:this.props.showView("months"),colSpan:5,"data-value":this.props.viewDate.month()},n.months(s)+" "+s.year()),r.th({key:"n",className:"rdtNext"},r.span({onClick:this.props.addTime(1,"months")},"›"))]),r.tr({key:"d"},this.getDaysOfWeek(n).map(function(t,e){return r.th({key:t+e,className:"dow"},t)}))]),r.tbody({key:"tb"},this.renderDays())],e&&t.push(e),r.div({className:"rdtDays"},r.table({},t))},getDaysOfWeek:function(t){var e=t._weekdaysMin,s=t.firstDayOfWeek(),n=[],i=0;return e.forEach(function(t){n[(7+i++-s)%7]=t}),n},renderDays:function(){var t,e,s,n,a=this.props.viewDate,o=this.props.selectedDate&&this.props.selectedDate.clone(),c=a.clone().subtract(1,"months"),l=a.year(),u=a.month(),d=[],p=[],h=this.props.renderDay||this.renderDay,m=this.props.isValidDate||this.alwaysValidDate;c.date(c.daysInMonth()).startOf("week");for(var f=c.clone().add(42,"d");c.isBefore(f);)t="rdtDay",n=c.clone(),c.year()===l&&c.month()<u||c.year()<l?t+=" rdtOld":(c.year()===l&&c.month()>u||c.year()>l)&&(t+=" rdtNew"),o&&c.isSame(o,"day")&&(t+=" rdtActive"),c.isSame(i(),"day")&&(t+=" rdtToday"),e=!m(n,o),e&&(t+=" rdtDisabled"),s={key:c.format("M_D"),"data-value":c.date(),className:t},e||(s.onClick=this.updateSelectedDate),p.push(h(s,n,o)),7===p.length&&(d.push(r.tr({key:c.format("M_D")},p)),p=[]),c.add(1,"d");return d},updateSelectedDate:function(t){this.props.updateSelectedDate(t,!0)},renderDay:function(t,e){return r.td(t,e.date())},renderFooter:function(){if(!this.props.timeFormat)return"";var t=this.props.selectedDate||this.props.viewDate;return r.tfoot({key:"tf"},r.tr({},r.td({onClick:this.props.showView("time"),colSpan:7,className:"rdtTimeToggle"},t.format(this.props.timeFormat))))},alwaysValidDate:function(){return 1},handleClickOutside:function(){this.props.handleClickOutside()}}));t.exports=o},function(t,e,s){var n,i;!function(a){function r(t,e,s){return function(t,n){var i=e.createClass({statics:{getClass:function(){return t.getClass?t.getClass():t}},getInstance:function(){return t.prototype.isReactComponent?this.refs.instance:this},__outsideClickHandler:function(){},getDefaultProps:function(){return{excludeScrollbar:n&&n.excludeScrollbar}},componentDidMount:function(){if("undefined"!=typeof document&&document.createElement){var t,i=this.getInstance();if(n&&"function"==typeof n.handleClickOutside){if(t=n.handleClickOutside(i),"function"!=typeof t)throw new Error("Component lacks a function for processing outside click events specified by the handleClickOutside config option.")}else if("function"==typeof i.handleClickOutside)t=e.Component.prototype.isPrototypeOf(i)?i.handleClickOutside.bind(i):i.handleClickOutside;else{if("function"!=typeof i.props.handleClickOutside)throw new Error("Component lacks a handleClickOutside(event) function for processing outside click events.");t=i.props.handleClickOutside}var a=s.findDOMNode(i);null===a&&(console.warn("Antipattern warning: there was no DOM node associated with the component that is being wrapped by outsideClick."),console.warn(["This is typically caused by having a component that starts life with a render function that","returns `null` (due to a state or props value), so that the component 'exist' in the React","chain of components, but not in the DOM.\n\nInstead, you need to refactor your code so that the","decision of whether or not to show your component is handled by the parent, in their render()","function.\n\nIn code, rather than:\n\n  A{render(){return check? <.../> : null;}\n  B{render(){<A check=... />}\n\nmake sure that you","use:\n\n  A{render(){return <.../>}\n  B{render(){return <...>{ check ? <A/> : null }<...>}}\n\nThat is:","the parent is always responsible for deciding whether or not to render any of its children.","It is not the child's responsibility to decide whether a render instruction from above should","get ignored or not by returning `null`.\n\nWhen any component gets its render() function called,","that is the signal that it should be rendering its part of the UI. It may in turn decide not to","render all of *its* children, but it should never return `null` for itself. It is not responsible","for that decision."].join(" ")));var r=this.__outsideClickHandler=f(a,i,t,this.props.outsideClickIgnoreClass||u,this.props.excludeScrollbar,this.props.preventDefault||!1,this.props.stopPropagation||!1),o=c.length;c.push(this),l[o]=r,this.props.disableOnClickOutside||this.enableOnClickOutside()}},componentWillReceiveProps:function(t){this.props.disableOnClickOutside&&!t.disableOnClickOutside?this.enableOnClickOutside():!this.props.disableOnClickOutside&&t.disableOnClickOutside&&this.disableOnClickOutside()},componentWillUnmount:function(){this.disableOnClickOutside(),this.__outsideClickHandler=!1;var t=c.indexOf(this);t>-1&&(l[t]&&l.splice(t,1),c.splice(t,1))},enableOnClickOutside:function(){var t=this.__outsideClickHandler;if("undefined"!=typeof document){var e=this.props.eventTypes||d;e.forEach||(e=[e]),e.forEach(function(e){document.addEventListener(e,t)})}},disableOnClickOutside:function(){var t=this.__outsideClickHandler;if("undefined"!=typeof document){var e=this.props.eventTypes||d;e.forEach||(e=[e]),e.forEach(function(e){document.removeEventListener(e,t)})}},render:function(){var s=this.props,n={};return Object.keys(this.props).forEach(function(t){"excludeScrollbar"!==t&&(n[t]=s[t])}),t.prototype.isReactComponent&&(n.ref="instance"),n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,e.createElement(t,n)}});return function(t,e){var s=t.displayName||t.name||"Component";e.displayName="OnClickOutside("+s+")"}(t,i),i}}function o(a,r){n=[s(3),s(7)],i=function(t,e){return r(a,t,e)}.apply(e,n),!(void 0!==i&&(t.exports=i))}var c=[],l=[],u="ignore-react-onclickoutside",d=["mousedown","touchstart"],p=function(t,e,s){return t===e||(t.correspondingElement?t.correspondingElement.classList.contains(s):t.classList.contains(s))},h=function(t,e,s){if(t===e)return!0;for(;t.parentNode;){if(p(t,e,s))return!0;t=t.parentNode}return t},m=function(t){return document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY},f=function(t,e,s,n,i,a,r){return function(e){a&&e.preventDefault(),r&&e.stopPropagation();var o=e.target;i&&m(e)||h(o,t,n)!==document||s(e)}};o(a,r)}(this)},function(t,e){t.exports=s},function(t,e,s){"use strict";function n(t){return t.charAt(0).toUpperCase()+t.slice(1)}var i=s(3),a=s(6),r=i.DOM,o=a(i.createClass({render:function(){return r.div({className:"rdtMonths"},[r.table({key:"a"},r.thead({},r.tr({},[r.th({key:"prev",className:"rdtPrev"},r.span({onClick:this.props.subtractTime(1,"years")},"‹")),r.th({key:"year",className:"rdtSwitch",onClick:this.props.showView("years"),colSpan:2,"data-value":this.props.viewDate.year()},this.props.viewDate.year()),r.th({key:"next",className:"rdtNext"},r.span({onClick:this.props.addTime(1,"years")},"›"))]))),r.table({key:"months"},r.tbody({key:"b"},this.renderMonths()))])},renderMonths:function(){for(var t,e,s,n,i,a,o,c=this.props.selectedDate,l=this.props.viewDate.month(),u=this.props.viewDate.year(),d=[],p=0,h=[],m=this.props.renderMonth||this.renderMonth,f=this.props.isValidDate||this.alwaysValidDate,v=1;p<12;)t="rdtMonth",s=this.props.viewDate.clone().set({year:u,month:p,date:v}),i=s.endOf("month").format("D"),a=Array.from({length:i},function(t,e){return e+1}),o=a.find(function(t){var e=s.clone().set("date",t);return f(e)}),n=void 0===o,n&&(t+=" rdtDisabled"),c&&p===c.month()&&u===c.year()&&(t+=" rdtActive"),e={key:p,"data-value":p,className:t},n||(e.onClick="months"===this.props.updateOn?this.updateSelectedMonth:this.props.setDate("month")),h.push(m(e,p,u,c&&c.clone())),4===h.length&&(d.push(r.tr({key:l+"_"+d.length},h)),h=[]),p++;return d},updateSelectedMonth:function(t){this.props.updateSelectedDate(t)},renderMonth:function(t,e){var s=this.props.viewDate,i=s.localeData().monthsShort(s.month(e)),a=3,o=i.substring(0,a);return r.td(t,n(o))},alwaysValidDate:function(){return 1},handleClickOutside:function(){this.props.handleClickOutside()}}));t.exports=o},function(t,e,s){"use strict";var n=s(3),i=s(6),a=n.DOM,r=i(n.createClass({render:function(){var t=10*parseInt(this.props.viewDate.year()/10,10);return a.div({className:"rdtYears"},[a.table({key:"a"},a.thead({},a.tr({},[a.th({key:"prev",className:"rdtPrev"},a.span({onClick:this.props.subtractTime(10,"years")},"‹")),a.th({key:"year",className:"rdtSwitch",onClick:this.props.showView("years"),colSpan:2},t+"-"+(t+9)),a.th({key:"next",className:"rdtNext"},a.span({onClick:this.props.addTime(10,"years")},"›"))]))),a.table({key:"years"},a.tbody({},this.renderYears(t)))])},renderYears:function(t){var e,s,n,i,r,o,c,l=[],u=-1,d=[],p=this.props.renderYear||this.renderYear,h=this.props.selectedDate,m=this.props.isValidDate||this.alwaysValidDate,f=0,v=1;for(t--;u<11;)e="rdtYear",n=this.props.viewDate.clone().set({year:t,month:f,date:v}),r=n.endOf("year").format("DDD"),o=Array.from({length:r},function(t,e){return e+1}),c=o.find(function(t){var e=n.clone().dayOfYear(t);return m(e)}),i=void 0===c,i&&(e+=" rdtDisabled"),h&&h.year()===t&&(e+=" rdtActive"),s={key:t,"data-value":t,className:e},i||(s.onClick="years"===this.props.updateOn?this.updateSelectedYear:this.props.setDate("year")),l.push(p(s,t,h&&h.clone())),4===l.length&&(d.push(a.tr({key:u},l)),l=[]),t++,u++;return d},updateSelectedYear:function(t){this.props.updateSelectedDate(t)},renderYear:function(t,e){return a.td(t,e)},alwaysValidDate:function(){return 1},handleClickOutside:function(){this.props.handleClickOutside()}}));t.exports=r},function(t,e,s){"use strict";var n=s(3),i=s(1),a=s(6),r=n.DOM,o=a(n.createClass({getInitialState:function(){return this.calculateState(this.props)},calculateState:function(t){var e=t.selectedDate||t.viewDate,s=t.timeFormat,n=[];s.toLowerCase().indexOf("h")!==-1&&(n.push("hours"),s.indexOf("m")!==-1&&(n.push("minutes"),s.indexOf("s")!==-1&&n.push("seconds")));var i=!1;return null!==this.state&&this.props.timeFormat.toLowerCase().indexOf(" a")!==-1&&(i=this.props.timeFormat.indexOf(" A")!==-1?this.state.hours>=12?"PM":"AM":this.state.hours>=12?"pm":"am"),{hours:e.format("H"),minutes:e.format("mm"),seconds:e.format("ss"),milliseconds:e.format("SSS"),daypart:i,counters:n}},renderCounter:function(t){if("daypart"!==t){var e=this.state[t];return"hours"===t&&this.props.timeFormat.toLowerCase().indexOf(" a")!==-1&&(e=(e-1)%12+1,0===e&&(e=12)),r.div({key:t,className:"rdtCounter"},[r.span({key:"up",className:"rdtBtn",onMouseDown:this.onStartClicking("increase",t)},"▲"),r.div({key:"c",className:"rdtCount"},e),r.span({key:"do",className:"rdtBtn",onMouseDown:this.onStartClicking("decrease",t)},"▼")])}return""},renderDayPart:function(){return r.div({key:"dayPart",className:"rdtCounter"},[r.span({key:"up",className:"rdtBtn",onMouseDown:this.onStartClicking("toggleDayPart","hours")},"▲"),r.div({key:this.state.daypart,className:"rdtCount"},this.state.daypart),r.span({key:"do",className:"rdtBtn",onMouseDown:this.onStartClicking("toggleDayPart","hours")},"▼")])},render:function(){var t=this,e=[];return this.state.counters.forEach(function(s){e.length&&e.push(r.div({key:"sep"+e.length,className:"rdtCounterSeparator"},":")),e.push(t.renderCounter(s))}),this.state.daypart!==!1&&e.push(t.renderDayPart()),3===this.state.counters.length&&this.props.timeFormat.indexOf("S")!==-1&&(e.push(r.div({className:"rdtCounterSeparator",key:"sep5"},":")),e.push(r.div({className:"rdtCounter rdtMilli",key:"m"},r.input({value:this.state.milliseconds,type:"text",onChange:this.updateMilli})))),r.div({className:"rdtTime"},r.table({},[this.renderHeader(),r.tbody({key:"b"},r.tr({},r.td({},r.div({className:"rdtCounters"},e))))]))},componentWillMount:function(){var t=this;t.timeConstraints={hours:{min:0,max:23,step:1},minutes:{min:0,max:59,step:1},seconds:{min:0,max:59,step:1},milliseconds:{min:0,max:999,step:1}},["hours","minutes","seconds","milliseconds"].forEach(function(e){i(t.timeConstraints[e],t.props.timeConstraints[e])}),this.setState(this.calculateState(this.props))},componentWillReceiveProps:function(t){this.setState(this.calculateState(t))},updateMilli:function(t){var e=parseInt(t.target.value,10);e===t.target.value&&e>=0&&e<1e3&&(this.props.setTime("milliseconds",e),this.setState({milliseconds:e}))},renderHeader:function(){if(!this.props.dateFormat)return null;var t=this.props.selectedDate||this.props.viewDate;return r.thead({key:"h"},r.tr({},r.th({className:"rdtSwitch",colSpan:4,onClick:this.props.showView("days")},t.format(this.props.dateFormat))))},onStartClicking:function(t,e){var s=this;return function(){var n={};n[e]=s[t](e),s.setState(n),s.timer=setTimeout(function(){s.increaseTimer=setInterval(function(){n[e]=s[t](e),s.setState(n)},70)},500),s.mouseUpListener=function(){clearTimeout(s.timer),clearInterval(s.increaseTimer),s.props.setTime(e,s.state[e]),document.body.removeEventListener("mouseup",s.mouseUpListener)},document.body.addEventListener("mouseup",s.mouseUpListener)}},padValues:{hours:1,minutes:2,seconds:2,milliseconds:3},toggleDayPart:function(t){var e=parseInt(this.state[t],10)+12;return e>this.timeConstraints[t].max&&(e=this.timeConstraints[t].min+(e-(this.timeConstraints[t].max+1))),this.pad(t,e)},increase:function(t){var e=parseInt(this.state[t],10)+this.timeConstraints[t].step;return e>this.timeConstraints[t].max&&(e=this.timeConstraints[t].min+(e-(this.timeConstraints[t].max+1))),this.pad(t,e)},decrease:function(t){var e=parseInt(this.state[t],10)-this.timeConstraints[t].step;return e<this.timeConstraints[t].min&&(e=this.timeConstraints[t].max+1-(this.timeConstraints[t].min-e)),this.pad(t,e)},pad:function(t,e){for(var s=e+"";s.length<this.padValues[t];)s="0"+s;return s},handleClickOutside:function(){this.props.handleClickOutside()}}));t.exports=o}])});
//# sourceMappingURL=react-datetime.min.js.map