marquex
2015-07-06 eba92bd9c24111756afb06f05b8478130a3beef0
dist/react-datetime.js
@@ -1,5 +1,5 @@
/*
react-datetime v0.3.1
react-datetime v0.4.0
https://github.com/arqex/react-datetime
MIT: https://github.com/arqex/react-datetime/raw/master/LICENSE
*/
@@ -59,13 +59,13 @@
/* 0 */
/***/ function(module, exports, __webpack_require__) {
   eval("'use strict';\r\n\r\nvar assign = __webpack_require__(3),\r\n\tReact = __webpack_require__(2),\r\n\tDaysView = __webpack_require__(4),\r\n\tMonthsView = __webpack_require__(6),\r\n\tYearsView = __webpack_require__(1),\r\n\tTimeView = __webpack_require__(7),\r\n\tmoment = __webpack_require__(5)\r\n;\r\n\r\nvar TYPES = React.PropTypes;\r\nvar Datetime = React.createClass({\r\n\tmixins: [\r\n\t\t__webpack_require__(8)\r\n\t],\r\n\tviewComponents: {\r\n\t\tdays: DaysView,\r\n\t\tmonths: MonthsView,\r\n\t\tyears: YearsView,\r\n\t\ttime: TimeView\r\n\t},\r\n\tpropTypes: {\r\n\t\tdate: TYPES.object,\r\n\t\tonChange: TYPES.func,\r\n\t\tlocale: TYPES.string,\r\n\t\tinput: TYPES.bool,\r\n\t\tdateFormat: TYPES.string,\r\n\t\ttimeFormat: TYPES.string,\r\n\t\tinputProps: TYPES.object,\r\n\t\tviewMode: TYPES.oneOf(['years', 'months', 'days', 'time']),\r\n\t\tminDate: TYPES.object,\r\n\t\tmaxDate: TYPES.object\r\n\t},\r\n\tgetDefaultProps: function() {\r\n\r\n\t\treturn {\r\n\t\t\tdate: new Date(),\r\n\t\t\tviewMode: 'days',\r\n\t\t\tinputProps: {},\r\n\t\t\tinput: true,\r\n\t\t\tonChange: function (x) {\r\n\t\t\t\tconsole.log(x);\r\n\t\t\t}\r\n\t\t};\r\n\t},\r\n\tgetInitialState: function() {\r\n\t\tvar formats = this.getFormats( this.props ),\r\n\t\t\tdate = this.props.date\r\n\t\t;\r\n\t\treturn {\r\n\t\t\tcurrentView: this.props.viewMode,\r\n\t\t\topen: !this.props.input,\r\n\t\t\tinputFormat: formats.datetime,\r\n\t\t\tviewDate: this.localMoment(date).startOf(\"month\"),\r\n\t\t\tselectedDate: this.localMoment(date),\r\n\t\t\tinputValue: this.localMoment(date).format( formats.datetime )\r\n\t\t};\r\n\t},\r\n\r\n\tgetFormats: function( props ){\r\n\t\tvar formats = {\r\n\t\t\t\tdate: '',\r\n\t\t\t\ttime: '',\r\n\t\t\t\tdatetime: ''\r\n\t\t\t},\r\n\t\t\tlocale = this.localMoment( props.date ).localeData()\r\n\t\t;\r\n\r\n\t\tif( props.dateFormat ){\r\n\t\t\tformats.date = props.dateFormat;\r\n\t\t}\r\n\t\tif( props.timeFormat ){\r\n\t\t\tformats.time = props.timeFormat;\r\n\t\t}\r\n\r\n\t\tif( !formats.date && !formats.time ){\r\n\t\t\tformats.date = locale.longDateFormat('L');\r\n\t\t\tformats.time = locale.longDateFormat('LT');\r\n\t\t\tformats.datetime = formats.date + ' ' + formats.time;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif( props.dateFormat ){\r\n\t\t\t\tformats.date = props.dateFormat;\r\n\t\t\t\tformats.datetime = formats.date;\r\n\t\t\t}\r\n\t\t\tif( props.timeFormat ){\r\n\t\t\t\tif( formats.date )\r\n\t\t\t\t\tformats.datetime += ' ';\r\n\t\t\t\tformats.time = props.timeFormat;\r\n\t\t\t\tformats.datetime += formats.time;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formats;\r\n\t},\r\n\r\n\tcomponentWillReceiveProps: function(nextProps) {\r\n\t\tvar formats = this.getFormats( nextProps );\r\n\t\tif ( formats.datetime !== this.getFormats(this.props).datetime ) {\r\n\t\t\treturn this.setState({\r\n\t\t\t\tinputFormat: nextProps.inputFormat\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tonChange: function(event) {\r\n\t\tvar value = event.target == null ? event : event.target.value,\r\n\t\t\tlocalMoment = this.localMoment( date )\r\n\t\t;\r\n\r\n\t\tif (localMoment.isValid()) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tselectedDate: localMoment,\r\n\t\t\t\tviewDate: localMoment.clone().startOf(\"month\")\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.setState({\r\n\t\t\tinputValue: value\r\n\t\t}, function() {\r\n\t\t\treturn this.props.onChange( localMoment.toDate() );\r\n\t\t});\r\n\t},\r\n\r\n\tshowView: function( view ){\r\n\t\tvar me = this;\r\n\t\treturn function( e ){\r\n\t\t\tme.setState({ currentView: view });\r\n\t\t};\r\n\t},\r\n\r\n\tsetDate: function( type ){\r\n\t\tvar me = this,\r\n\t\t\tnextViews = {\r\n\t\t\t\tmonth: 'days',\r\n\t\t\t\tyear: 'months'\r\n\t\t\t}\r\n\t\t;\r\n\t\treturn function( e ){\r\n\t\t\tme.setState({\r\n\t\t\t\tviewDate: me.state.viewDate.clone()[ type ]( e.target.innerHTML ).startOf( type ),\r\n\t\t\t\tcurrentView: nextViews[ type ]\r\n\t\t\t});\r\n\t\t};\r\n\t},\r\n\r\n\taddTime: function( amount, type, toSelected ){\r\n\t\treturn this.updateTime( 'add', amount, type, toSelected );\r\n\t},\r\n\r\n\tsubtractTime: function( amount, type, toSelected ){\r\n\t\treturn this.updateTime( 'subtract', amount, type, toSelected );\r\n\t},\r\n\r\n\tupdateTime: function( op, amount, type, toSelected ){\r\n\t\tvar me = this;\r\n\r\n\t\treturn function(){\r\n\t\t\tvar update = {},\r\n\t\t\t\tdate = toSelected ? 'selectedDate' : 'viewDate'\r\n\t\t\t;\r\n\r\n\t\t\tupdate[ date ] = me.state[ date ].clone()[ op ]( amount, type );\r\n\r\n\t\t\tme.setState( update );\r\n\t\t};\r\n\t},\r\n\r\n\tallowedSetTime: ['hours','minutes','seconds', 'milliseconds'],\r\n\tsetTime: function( type, value ){\r\n\t\tvar index = this.allowedSetTime.indexOf( type ) + 1,\r\n\t\t\tdate = this.state.selectedDate.clone(),\r\n\t\t\tnextType\r\n\t\t;\r\n\r\n\t\t// It is needed to set all the time properties\r\n\t\t// to not to reset the time\r\n\t\tdate[ type ]( value );\r\n\t\tfor (; index < this.allowedSetTime.length; index++) {\r\n\t\t\tnextType = this.allowedSetTime[index];\r\n\t\t\tdate[ nextType ]( date[nextType]() );\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tselectedDate: date,\r\n\t\t\tinputValue: date.format( this.state.inputFormat )\r\n\t\t}, this.callOnChange );\r\n\t},\r\n\r\n\tcallOnChange: function(){\r\n\t\tthis.props.onChange(this.state.selectedDate.format( this.state.inputFormat ));\r\n\t},\r\n\r\n\tupdateDate: function( e ) {\r\n\t\tvar target = e.target,\r\n\t\t\tmodifier = 0,\r\n\t\t\tcurrentDate = this.state.selectedDate,\r\n\t\t\tdate\r\n\t\t;\r\n\r\n\t\tif(target.className.indexOf(\"new\") != -1)\r\n\t\t\tmodifier = 1;\r\n\t\telse if(target.className.indexOf(\"old\") != -1)\r\n\t\t\tmodifier = -1;\r\n\r\n\t\tdate = this.state.viewDate.clone()\r\n\t\t\t.month( this.state.viewDate.month() + modifier )\r\n\t\t\t.date( parseInt( target.innerHTML ) )\r\n\t\t\t.hours( currentDate.hours() )\r\n\t\t\t.minutes( currentDate.minutes() )\r\n\t\t\t.seconds( currentDate.seconds() )\r\n\t\t\t.milliseconds( currentDate.milliseconds() )\r\n\t\t;\r\n\r\n\t\tthis.setState({\r\n\t\t\tselectedDate: date,\r\n\t\t\tviewDate: date.clone().startOf('month'),\r\n\t\t\tinputValue: date.format( this.state.inputFormat )\r\n\t\t});\r\n\t},\r\n\r\n\topenCalendar: function() {\r\n\t\tthis.setState({ open: true });\r\n\t},\r\n\r\n\thandleClickOutside: function(){\r\n\t\tif( this.props.input && this.state.open )\r\n\t\t\tthis.setState({ open: false });\r\n\t},\r\n\r\n\tlocalMoment: function( date ){\r\n\t\tvar m = moment( date );\r\n\t\tif( this.props.locale )\r\n\t\t\tm.locale( this.props.locale );\r\n\t\treturn m;\r\n\t},\r\n\r\n\tcomponentProps: {\r\n\t\tfromProps: ['viewMode', 'minDate', 'maxDate'],\r\n\t\tfromState: ['viewDate', 'selectedDate' ],\r\n\t\tfromThis: ['setDate', 'setTime', 'showView', 'addTime', 'subtractTime', 'updateDate', 'localMoment']\r\n\t},\r\n\r\n\tgetComponentProps: function(){\r\n\t\tvar me = this,\r\n\t\t\tformats = this.getFormats( this.props ),\r\n\t\t\tprops = {dateFormat: formats.date, timeFormat: formats.time}\r\n\t\t;\r\n\r\n\t\tthis.componentProps.fromProps.forEach( function( name ){\r\n\t\t\tprops[ name ] = me.props[ name ];\r\n\t\t});\r\n\t\tthis.componentProps.fromState.forEach( function( name ){\r\n\t\t\tprops[ name ] = me.state[ name ];\r\n\t\t});\r\n\t\tthis.componentProps.fromThis.forEach( function( name ){\r\n\t\t\tprops[ name ] = me[ name ];\r\n\t\t});\r\n\r\n\t\treturn props;\r\n\t},\r\n\r\n\trender: function() {\r\n\t\tvar Component = this.viewComponents[ this.state.currentView ],\r\n\t\t\tDOM = React.DOM,\r\n\t\t\tclassName = 'rdt',\r\n\t\t\tchildren = []\r\n\t\t;\r\n\r\n\t\tif( this.props.input ){\r\n\t\t\tchildren = [ DOM.input( assign({\r\n\t\t\t\tkey: 'i',\r\n\t\t\t\ttype:'text',\r\n\t\t\t\tclassName:'form-control',\r\n\t\t\t\tonFocus: this.openCalendar,\r\n\t\t\t\tonChange: this.onChange,\r\n\t\t\t\tvalue: this.state.inputValue\r\n\t\t\t}, this.props.inputProps ))];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclassName += ' rdtStatic';\r\n\t\t}\r\n\r\n\t\tif( this.state.open )\r\n\t\t\tclassName += ' rdtOpen';\r\n\r\n\t\treturn DOM.div({className: className}, children.concat(\r\n\t\t\tDOM.div(\r\n\t\t\t\t{ key: 'dt', className: 'rdtPicker' },\r\n\t\t\t\tReact.createElement( Component, this.getComponentProps())\r\n\t\t\t)\r\n\t\t));\r\n\t}\r\n});\r\n\r\nmodule.exports = Datetime;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Datetime.js\n ** module id = 0\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./Datetime.js?");
   eval("'use strict';\r\n\r\nvar assign = __webpack_require__(3),\r\n\tReact = __webpack_require__(2),\r\n\tDaysView = __webpack_require__(4),\r\n\tMonthsView = __webpack_require__(6),\r\n\tYearsView = __webpack_require__(1),\r\n\tTimeView = __webpack_require__(7),\r\n\tmoment = __webpack_require__(5)\r\n;\r\n\r\nvar TYPES = React.PropTypes;\r\nvar Datetime = React.createClass({\r\n\tmixins: [\r\n\t\t__webpack_require__(8)\r\n\t],\r\n\tviewComponents: {\r\n\t\tdays: DaysView,\r\n\t\tmonths: MonthsView,\r\n\t\tyears: YearsView,\r\n\t\ttime: TimeView\r\n\t},\r\n\tpropTypes: {\r\n\t\tdate: TYPES.object,\r\n\t\tonChange: TYPES.func,\r\n\t\tlocale: TYPES.string,\r\n\t\tinput: TYPES.bool,\r\n\t\tdateFormat: TYPES.string,\r\n\t\ttimeFormat: TYPES.string,\r\n\t\tinputProps: TYPES.object,\r\n\t\tviewMode: TYPES.oneOf(['years', 'months', 'days', 'time']),\r\n\t\tminDate: TYPES.object,\r\n\t\tmaxDate: TYPES.object\r\n\t},\r\n\tgetDefaultProps: function() {\r\n\r\n\t\treturn {\r\n\t\t\tdate: new Date(),\r\n\t\t\tviewMode: 'days',\r\n\t\t\tinputProps: {},\r\n\t\t\tinput: true,\r\n\t\t\tonChange: function (x) {\r\n\t\t\t\tconsole.log(x);\r\n\t\t\t}\r\n\t\t};\r\n\t},\r\n\tgetInitialState: function() {\r\n\t\tvar formats = this.getFormats( this.props ),\r\n\t\t\tdate = this.props.date\r\n\t\t;\r\n\t\treturn {\r\n\t\t\tcurrentView: this.props.viewMode,\r\n\t\t\topen: !this.props.input,\r\n\t\t\tinputFormat: formats.datetime,\r\n\t\t\tviewDate: this.localMoment(date).startOf(\"month\"),\r\n\t\t\tselectedDate: this.localMoment(date),\r\n\t\t\tinputValue: this.localMoment(date).format( formats.datetime )\r\n\t\t};\r\n\t},\r\n\r\n\tgetFormats: function( props ){\r\n\t\tvar formats = {\r\n\t\t\t\tdate: '',\r\n\t\t\t\ttime: '',\r\n\t\t\t\tdatetime: ''\r\n\t\t\t},\r\n\t\t\tlocale = this.localMoment( props.date ).localeData()\r\n\t\t;\r\n\r\n\t\tif( props.dateFormat ){\r\n\t\t\tformats.date = props.dateFormat;\r\n\t\t}\r\n\t\tif( props.timeFormat ){\r\n\t\t\tformats.time = props.timeFormat;\r\n\t\t}\r\n\r\n\t\tif( !formats.date && !formats.time ){\r\n\t\t\tformats.date = locale.longDateFormat('L');\r\n\t\t\tformats.time = locale.longDateFormat('LT');\r\n\t\t\tformats.datetime = formats.date + ' ' + formats.time;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif( props.dateFormat ){\r\n\t\t\t\tformats.date = props.dateFormat;\r\n\t\t\t\tformats.datetime = formats.date;\r\n\t\t\t}\r\n\t\t\tif( props.timeFormat ){\r\n\t\t\t\tif( formats.date )\r\n\t\t\t\t\tformats.datetime += ' ';\r\n\t\t\t\tformats.time = props.timeFormat;\r\n\t\t\t\tformats.datetime += formats.time;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formats;\r\n\t},\r\n\r\n\tcomponentWillReceiveProps: function(nextProps) {\r\n\t\tvar formats = this.getFormats( nextProps );\r\n\t\tif ( formats.datetime !== this.getFormats(this.props).datetime ) {\r\n\t\t\treturn this.setState({\r\n\t\t\t\tinputFormat: nextProps.inputFormat\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tonChange: function(event) {\r\n\t\tvar value = event.target == null ? event : event.target.value,\r\n\t\t\tlocalMoment = this.localMoment( date )\r\n\t\t;\r\n\r\n\t\tif (localMoment.isValid()) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tselectedDate: localMoment,\r\n\t\t\t\tviewDate: localMoment.clone().startOf(\"month\")\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.setState({\r\n\t\t\tinputValue: value\r\n\t\t}, function() {\r\n\t\t\treturn this.props.onChange( localMoment.toDate() );\r\n\t\t});\r\n\t},\r\n\r\n\tshowView: function( view ){\r\n\t\tvar me = this;\r\n\t\treturn function( e ){\r\n\t\t\tme.setState({ currentView: view });\r\n\t\t};\r\n\t},\r\n\r\n\tsetDate: function( type ){\r\n\t\tvar me = this,\r\n\t\t\tnextViews = {\r\n\t\t\t\tmonth: 'days',\r\n\t\t\t\tyear: 'months'\r\n\t\t\t}\r\n\t\t;\r\n\t\treturn function( e ){\r\n\t\t\tme.setState({\r\n\t\t\t\tviewDate: me.state.viewDate.clone()[ type ]( parseInt(e.target.dataset.value) ).startOf( type ),\r\n\t\t\t\tcurrentView: nextViews[ type ]\r\n\t\t\t});\r\n\t\t};\r\n\t},\r\n\r\n\taddTime: function( amount, type, toSelected ){\r\n\t\treturn this.updateTime( 'add', amount, type, toSelected );\r\n\t},\r\n\r\n\tsubtractTime: function( amount, type, toSelected ){\r\n\t\treturn this.updateTime( 'subtract', amount, type, toSelected );\r\n\t},\r\n\r\n\tupdateTime: function( op, amount, type, toSelected ){\r\n\t\tvar me = this;\r\n\r\n\t\treturn function(){\r\n\t\t\tvar update = {},\r\n\t\t\t\tdate = toSelected ? 'selectedDate' : 'viewDate'\r\n\t\t\t;\r\n\r\n\t\t\tupdate[ date ] = me.state[ date ].clone()[ op ]( amount, type );\r\n\r\n\t\t\tme.setState( update );\r\n\t\t};\r\n\t},\r\n\r\n\tallowedSetTime: ['hours','minutes','seconds', 'milliseconds'],\r\n\tsetTime: function( type, value ){\r\n\t\tvar index = this.allowedSetTime.indexOf( type ) + 1,\r\n\t\t\tdate = this.state.selectedDate.clone(),\r\n\t\t\tnextType\r\n\t\t;\r\n\r\n\t\t// It is needed to set all the time properties\r\n\t\t// to not to reset the time\r\n\t\tdate[ type ]( value );\r\n\t\tfor (; index < this.allowedSetTime.length; index++) {\r\n\t\t\tnextType = this.allowedSetTime[index];\r\n\t\t\tdate[ nextType ]( date[nextType]() );\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tselectedDate: date,\r\n\t\t\tinputValue: date.format( this.state.inputFormat )\r\n\t\t}, this.callOnChange );\r\n\t},\r\n\r\n\tcallOnChange: function(){\r\n\t\tthis.props.onChange(this.state.selectedDate.format( this.state.inputFormat ));\r\n\t},\r\n\r\n\tupdateDate: function( e ) {\r\n\t\tvar target = e.target,\r\n\t\t\tmodifier = 0,\r\n\t\t\tcurrentDate = this.state.selectedDate,\r\n\t\t\tdate\r\n\t\t;\r\n\r\n\t\tif(target.className.indexOf(\"new\") != -1)\r\n\t\t\tmodifier = 1;\r\n\t\telse if(target.className.indexOf(\"old\") != -1)\r\n\t\t\tmodifier = -1;\r\n\r\n\t\tdate = this.state.viewDate.clone()\r\n\t\t\t.month( this.state.viewDate.month() + modifier )\r\n\t\t\t.date( parseInt( target.dataset.value ) )\r\n\t\t\t.hours( currentDate.hours() )\r\n\t\t\t.minutes( currentDate.minutes() )\r\n\t\t\t.seconds( currentDate.seconds() )\r\n\t\t\t.milliseconds( currentDate.milliseconds() )\r\n\t\t;\r\n\r\n\t\tthis.setState({\r\n\t\t\tselectedDate: date,\r\n\t\t\tviewDate: date.clone().startOf('month'),\r\n\t\t\tinputValue: date.format( this.state.inputFormat )\r\n\t\t});\r\n\t},\r\n\r\n\topenCalendar: function() {\r\n\t\tthis.setState({ open: true });\r\n\t},\r\n\r\n\thandleClickOutside: function(){\r\n\t\tif( this.props.input && this.state.open )\r\n\t\t\tthis.setState({ open: false });\r\n\t},\r\n\r\n\tlocalMoment: function( date ){\r\n\t\tvar m = moment( date );\r\n\t\tif( this.props.locale )\r\n\t\t\tm.locale( this.props.locale );\r\n\t\treturn m;\r\n\t},\r\n\r\n\tcomponentProps: {\r\n\t\tfromProps: ['viewMode', 'minDate', 'maxDate', 'renderDay', 'renderMonth', 'renderYear'],\r\n\t\tfromState: ['viewDate', 'selectedDate' ],\r\n\t\tfromThis: ['setDate', 'setTime', 'showView', 'addTime', 'subtractTime', 'updateDate', 'localMoment']\r\n\t},\r\n\r\n\tgetComponentProps: function(){\r\n\t\tvar me = this,\r\n\t\t\tformats = this.getFormats( this.props ),\r\n\t\t\tprops = {dateFormat: formats.date, timeFormat: formats.time}\r\n\t\t;\r\n\r\n\t\tthis.componentProps.fromProps.forEach( function( name ){\r\n\t\t\tprops[ name ] = me.props[ name ];\r\n\t\t});\r\n\t\tthis.componentProps.fromState.forEach( function( name ){\r\n\t\t\tprops[ name ] = me.state[ name ];\r\n\t\t});\r\n\t\tthis.componentProps.fromThis.forEach( function( name ){\r\n\t\t\tprops[ name ] = me[ name ];\r\n\t\t});\r\n\r\n\t\treturn props;\r\n\t},\r\n\r\n\trender: function() {\r\n\t\tvar Component = this.viewComponents[ this.state.currentView ],\r\n\t\t\tDOM = React.DOM,\r\n\t\t\tclassName = 'rdt',\r\n\t\t\tchildren = []\r\n\t\t;\r\n\r\n\t\tif( this.props.input ){\r\n\t\t\tchildren = [ DOM.input( assign({\r\n\t\t\t\tkey: 'i',\r\n\t\t\t\ttype:'text',\r\n\t\t\t\tclassName:'form-control',\r\n\t\t\t\tonFocus: this.openCalendar,\r\n\t\t\t\tonChange: this.onChange,\r\n\t\t\t\tvalue: this.state.inputValue\r\n\t\t\t}, this.props.inputProps ))];\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclassName += ' rdtStatic';\r\n\t\t}\r\n\r\n\t\tif( this.state.open )\r\n\t\t\tclassName += ' rdtOpen';\r\n\r\n\t\treturn DOM.div({className: className}, children.concat(\r\n\t\t\tDOM.div(\r\n\t\t\t\t{ key: 'dt', className: 'rdtPicker' },\r\n\t\t\t\tReact.createElement( Component, this.getComponentProps())\r\n\t\t\t)\r\n\t\t));\r\n\t}\r\n});\r\n\r\nmodule.exports = Datetime;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./Datetime.js\n ** module id = 0\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./Datetime.js?");
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
   eval("'use strict';\r\n\r\nvar React = __webpack_require__(2);\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerYears = React.createClass({\r\n\trenderYears: function( year ) {\r\n\t\tvar years = [],\r\n\t\t\ti = -1,\r\n\t\t\trows = [],\r\n\t\t\tclasses\r\n\t\t;\r\n\r\n\t\tyear--;\r\n\t\twhile (i < 11) {\r\n\t\t\tclasses = 'year';\r\n\t\t\tif( i === -1 | i === 10 )\r\n\t\t\t\tclasses += ' old';\r\n\t\t\tif( this.props.selectedDate.year() === year )\r\n\t\t\t\tclasses += ' active';\r\n\r\n\t\t\tyears.push( DOM.td({ key: year, className: classes, onClick: this.props.setDate('year') }, year ));\r\n\t\t\t// years.push(<td key={year} className={ classes } onClick={this.props.setDate('year')}>{year}</td>);\r\n\t\t\tif( years.length == 4 ){\r\n\t\t\t\trows.push( DOM.tr({ key: i }, years ) );\r\n\t\t\t\tyears = [];\r\n\t\t\t}\r\n\r\n\t\t\tyear++;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn rows;\r\n\t},\r\n\trender: function() {\r\n\t\tvar year = parseInt(this.props.viewDate.year() / 10, 10) * 10;\r\n\r\n\t\treturn DOM.div({ className: 'rdtYears' },[\r\n\t\t\tDOM.table({ key: 'a'}, DOM.thead({}, DOM.tr({},[\r\n\t\t\t\tDOM.th({ key: 'prev', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(10, 'years')}, '‹')),\r\n\t\t\t\tDOM.th({ key: 'year', className: 'switch', onClick: this.props.showView('years'), colSpan: 2 }, year + '-' + (year + 9) ),\r\n\t\t\t\tDOM.th({ key: 'next', className: 'next'}, DOM.button({onClick: this.props.addTime(10, 'years')}, '›'))\r\n\t\t\t\t]))),\r\n\t\t\tDOM.table({ key: 'years'}, DOM.tbody({}, this.renderYears( year )))\r\n\t\t]);\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerYears;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/YearsView.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/YearsView.js?");
   eval("'use strict';\r\n\r\nvar React = __webpack_require__(2);\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerYears = React.createClass({\r\n\trender: function() {\r\n\t\tvar year = parseInt(this.props.viewDate.year() / 10, 10) * 10;\r\n\r\n\t\treturn DOM.div({ className: 'rdtYears' },[\r\n\t\t\tDOM.table({ key: 'a'}, DOM.thead({}, DOM.tr({},[\r\n\t\t\t\tDOM.th({ key: 'prev', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(10, 'years')}, '‹')),\r\n\t\t\t\tDOM.th({ key: 'year', className: 'switch', onClick: this.props.showView('years'), colSpan: 2 }, year + '-' + (year + 9) ),\r\n\t\t\t\tDOM.th({ key: 'next', className: 'next'}, DOM.button({onClick: this.props.addTime(10, 'years')}, '›'))\r\n\t\t\t\t]))),\r\n\t\t\tDOM.table({ key: 'years'}, DOM.tbody({}, this.renderYears( year )))\r\n\t\t]);\r\n\t},\r\n\r\n\trenderYears: function( year ) {\r\n\t\tvar years = [],\r\n\t\t\ti = -1,\r\n\t\t\trows = [],\r\n\t\t\trenderer = this.props.renderYear || this.renderYear,\r\n\t\t\tclasses, props\r\n\t\t;\r\n\r\n\t\tyear--;\r\n\t\twhile (i < 11) {\r\n\t\t\tclasses = 'year';\r\n\t\t\tif( i === -1 | i === 10 )\r\n\t\t\t\tclasses += ' old';\r\n\t\t\tif( this.props.selectedDate.year() === year )\r\n\t\t\t\tclasses += ' active';\r\n\r\n\t\t\tprops = {\r\n\t\t\t\tkey: year,\r\n\t\t\t\t'data-value': year,\r\n\t\t\t\tclassName: classes,\r\n\t\t\t\tonClick: this.props.setDate('year')\r\n\t\t\t};\r\n\r\n\t\t\tyears.push( renderer( props, year, this.props.selectedDate.clone() ));\r\n\r\n\t\t\tif( years.length == 4 ){\r\n\t\t\t\trows.push( DOM.tr({ key: i }, years ) );\r\n\t\t\t\tyears = [];\r\n\t\t\t}\r\n\r\n\t\t\tyear++;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t},\r\n\r\n\trenderYear: function( props, year, selectedDate ){\r\n\t\treturn DOM.td( props, year );\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerYears;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/YearsView.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/YearsView.js?");
/***/ },
/* 2 */
@@ -83,7 +83,7 @@
/* 4 */
/***/ function(module, exports, __webpack_require__) {
   eval("var React = __webpack_require__(2),\r\n\tmoment = __webpack_require__(5)\r\n;\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerDays = React.createClass({\r\n\r\n\trender: function() {\r\n\t\tvar footer = this.renderFooter(),\r\n\t\t\tdate = this.props.viewDate,\r\n\t\t\tlocale = date.localeData(),\r\n\t\t\ttableChildren\r\n\t\t;\r\n\r\n\t\ttableChildren = [\r\n\t\t\tDOM.thead({ key: 'th'}, [\r\n\t\t\t\tDOM.tr({ key: 'h'},[\r\n\t\t\t\t\tDOM.th({ key: 'p', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(1, 'months')}, '‹')),\r\n\t\t\t\t\tDOM.th({ key: 's', className: 'switch', onClick: this.props.showView('months'), colSpan: 5 }, locale.months( date ) + ' ' + date.year() ),\r\n\t\t\t\t\tDOM.th({ key: 'n', className: 'next' }, DOM.button({onClick: this.props.addTime(1, 'months')}, '›'))\r\n\t\t\t\t]),\r\n\t\t\t\tDOM.tr({ key: 'd'}, this.getDaysOfWeek( locale ).map( function( day ){ return DOM.th({ key: day, className: 'dow'}, day ); }) )\r\n\t\t\t]),\r\n\t\t\tDOM.tbody({key: 'tb'}, this.renderDays())\r\n\t\t];\r\n\r\n\t\tif( footer )\r\n\t\t\ttableChildren.push( footer );\r\n\r\n\t\treturn DOM.div({ className: 'rdtDays' },\r\n\t\t\tDOM.table({}, tableChildren )\r\n\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Get a list of the days of the week\r\n\t * depending on the current locale\r\n\t * @return {array} A list with the shortname of the days\r\n\t */\r\n\tgetDaysOfWeek: function( locale ){\r\n\t\tvar days = locale._weekdaysMin,\r\n\t\t\tfirst = locale.firstDayOfWeek(),\r\n\t\t\tdow = [],\r\n\t\t\ti = 0\r\n\t\t;\r\n\r\n\t\tdays.forEach( function( day ){\r\n\t\t\tdow[ (7 + (i++) - first) % 7 ] = day;\r\n\t\t});\r\n\r\n\t\treturn dow;\r\n\t},\r\n\r\n\trenderDays: function() {\r\n\t\tvar date = this.props.viewDate,\r\n\t\t\tselected = this.props.selectedDate,\r\n\t\t\tprevMonth = date.clone().subtract( 1, 'months' ),\r\n\t\t\tcurrentYear = date.year(),\r\n\t\t\tcurrentMonth = date.month(),\r\n\t\t\tselectedDate = {y: selected.year(), M: selected.month(), d: selected.date()},\r\n\t\t\tminDate = this.props.minDate,\r\n\t\t\tmaxDate = this.props.maxDate,\r\n\t\t\tweeks = [],\r\n\t\t\tdays = [],\r\n\t\t\tclasses, disabled, dayProps\r\n\t\t;\r\n\r\n\t\t// Go to the last week of the previous month\r\n\t\tprevMonth.date( prevMonth.daysInMonth() ).startOf('week');\r\n\t\tvar lastDay = prevMonth.clone().add(42, 'd');\r\n\r\n\t\twhile( prevMonth.isBefore( lastDay ) ){\r\n\t\t\tclasses = 'day';\r\n\r\n\t\t\tif( prevMonth.year() < currentYear || prevMonth.month() < currentMonth )\r\n\t\t\t\tclasses += ' old';\r\n\t\t\telse if( prevMonth.year() > currentYear || prevMonth.month() > currentMonth )\r\n\t\t\t\tclasses += ' new';\r\n\r\n\t\t\tif( prevMonth.isSame( selectedDate ) )\r\n\t\t\t\tclasses += ' active';\r\n\r\n\t\t\tif (prevMonth.isSame(moment(), 'day') )\r\n\t\t\t\tclasses += ' today';\r\n\r\n\t\t\tdisabled = minDate && prevMonth.isBefore(minDate) || maxDate && prevMonth.isAfter(maxDate);\r\n\t\t\tif( disabled )\r\n\t\t\t\tclasses += ' disabled';\r\n\r\n\t\t\tdayProps = { key: prevMonth.format('M_D'), className: classes };\r\n\t\t\tif( !disabled )\r\n\t\t\t\tdayProps.onClick = this.props.updateDate;\r\n\r\n\t\t\tdays.push( DOM.td( dayProps, prevMonth.date() ));\r\n\t\t\tif( days.length == 7 ){\r\n\t\t\t\tweeks.push( DOM.tr( {key: prevMonth.format('M_D')}, days ) );\r\n\t\t\t\tdays = [];\r\n\t\t\t}\r\n\r\n\t\t\tprevMonth.add( 1, 'd' );\r\n\t\t}\r\n\r\n\t\treturn weeks;\r\n\t},\r\n\r\n\trenderFooter: function(){\r\n\t\tif( !this.props.timeFormat )\r\n\t\t\treturn '';\r\n\r\n\t\treturn DOM.tfoot({ key: 'tf'},\r\n\t\t\tDOM.tr({},\r\n\t\t\t\tDOM.td({ onClick: this.props.showView('time'), colSpan: 7, className: 'timeToggle'}, this.props.selectedDate.format( this.props.timeFormat ))\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerDays;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/DaysView.js\n ** module id = 4\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/DaysView.js?");
   eval("var React = __webpack_require__(2),\r\n\tmoment = __webpack_require__(5)\r\n;\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerDays = React.createClass({\r\n\r\n\trender: function() {\r\n\t\tvar footer = this.renderFooter(),\r\n\t\t\tdate = this.props.viewDate,\r\n\t\t\tlocale = date.localeData(),\r\n\t\t\ttableChildren\r\n\t\t;\r\n\r\n\t\ttableChildren = [\r\n\t\t\tDOM.thead({ key: 'th'}, [\r\n\t\t\t\tDOM.tr({ key: 'h'},[\r\n\t\t\t\t\tDOM.th({ key: 'p', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(1, 'months')}, '‹')),\r\n\t\t\t\t\tDOM.th({ key: 's', className: 'switch', onClick: this.props.showView('months'), colSpan: 5 }, locale.months( date ) + ' ' + date.year() ),\r\n\t\t\t\t\tDOM.th({ key: 'n', className: 'next' }, DOM.button({onClick: this.props.addTime(1, 'months')}, '›'))\r\n\t\t\t\t]),\r\n\t\t\t\tDOM.tr({ key: 'd'}, this.getDaysOfWeek( locale ).map( function( day ){ return DOM.th({ key: day, className: 'dow'}, day ); }) )\r\n\t\t\t]),\r\n\t\t\tDOM.tbody({key: 'tb'}, this.renderDays())\r\n\t\t];\r\n\r\n\t\tif( footer )\r\n\t\t\ttableChildren.push( footer );\r\n\r\n\t\treturn DOM.div({ className: 'rdtDays' },\r\n\t\t\tDOM.table({}, tableChildren )\r\n\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Get a list of the days of the week\r\n\t * depending on the current locale\r\n\t * @return {array} A list with the shortname of the days\r\n\t */\r\n\tgetDaysOfWeek: function( locale ){\r\n\t\tvar days = locale._weekdaysMin,\r\n\t\t\tfirst = locale.firstDayOfWeek(),\r\n\t\t\tdow = [],\r\n\t\t\ti = 0\r\n\t\t;\r\n\r\n\t\tdays.forEach( function( day ){\r\n\t\t\tdow[ (7 + (i++) - first) % 7 ] = day;\r\n\t\t});\r\n\r\n\t\treturn dow;\r\n\t},\r\n\r\n\trenderDays: function() {\r\n\t\tvar date = this.props.viewDate,\r\n\t\t\tselected = this.props.selectedDate.clone(),\r\n\t\t\tprevMonth = date.clone().subtract( 1, 'months' ),\r\n\t\t\tcurrentYear = date.year(),\r\n\t\t\tcurrentMonth = date.month(),\r\n\t\t\tselectedDate = {y: selected.year(), M: selected.month(), d: selected.date()},\r\n\t\t\tminDate = this.props.minDate,\r\n\t\t\tmaxDate = this.props.maxDate,\r\n\t\t\tweeks = [],\r\n\t\t\tdays = [],\r\n\t\t\trenderer = this.props.renderDay || this.renderDay,\r\n\t\t\tclasses, disabled, dayProps\r\n\t\t;\r\n\r\n\t\t// Go to the last week of the previous month\r\n\t\tprevMonth.date( prevMonth.daysInMonth() ).startOf('week');\r\n\t\tvar lastDay = prevMonth.clone().add(42, 'd');\r\n\r\n\t\twhile( prevMonth.isBefore( lastDay ) ){\r\n\t\t\tclasses = 'day';\r\n\r\n\t\t\tif( prevMonth.year() < currentYear || prevMonth.month() < currentMonth )\r\n\t\t\t\tclasses += ' old';\r\n\t\t\telse if( prevMonth.year() > currentYear || prevMonth.month() > currentMonth )\r\n\t\t\t\tclasses += ' new';\r\n\r\n\t\t\tif( prevMonth.isSame( selectedDate ) )\r\n\t\t\t\tclasses += ' active';\r\n\r\n\t\t\tif (prevMonth.isSame(moment(), 'day') )\r\n\t\t\t\tclasses += ' today';\r\n\r\n\t\t\tdisabled = minDate && prevMonth.isBefore(minDate) || maxDate && prevMonth.isAfter(maxDate);\r\n\t\t\tif( disabled )\r\n\t\t\t\tclasses += ' disabled';\r\n\r\n\t\t\tdayProps = {\r\n\t\t\t\tkey: prevMonth.format('M_D'),\r\n\t\t\t\t'data-value': prevMonth.date(),\r\n\t\t\t\tclassName: classes\r\n\t\t\t};\r\n\t\t\tif( !disabled )\r\n\t\t\t\tdayProps.onClick = this.props.updateDate;\r\n\r\n\t\t\tdays.push( renderer( dayProps, prevMonth.clone(), selected ) );\r\n\r\n\t\t\tif( days.length == 7 ){\r\n\t\t\t\tweeks.push( DOM.tr( {key: prevMonth.format('M_D')}, days ) );\r\n\t\t\t\tdays = [];\r\n\t\t\t}\r\n\r\n\t\t\tprevMonth.add( 1, 'd' );\r\n\t\t}\r\n\r\n\t\treturn weeks;\r\n\t},\r\n\r\n\trenderDay: function( props, currentDate, selectedDate ){\r\n\t\treturn DOM.td( props, currentDate.date() );\r\n\t},\r\n\r\n\trenderFooter: function(){\r\n\t\tif( !this.props.timeFormat )\r\n\t\t\treturn '';\r\n\r\n\t\treturn DOM.tfoot({ key: 'tf'},\r\n\t\t\tDOM.tr({},\r\n\t\t\t\tDOM.td({ onClick: this.props.showView('time'), colSpan: 7, className: 'timeToggle'}, this.props.selectedDate.format( this.props.timeFormat ))\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerDays;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/DaysView.js\n ** module id = 4\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/DaysView.js?");
/***/ },
/* 5 */
@@ -95,7 +95,7 @@
/* 6 */
/***/ function(module, exports, __webpack_require__) {
   eval("'use strict';\r\n\r\nvar React = __webpack_require__(2),\r\nmoment = __webpack_require__(5)\r\n;\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerMonths = React.createClass({\r\n\trenderMonths: function() {\r\n\t\tvar date = this.props.selectedDate,\r\n\t\t\tmonth = date.month(),\r\n\t\t\tmonthsShort = date.localeData()._monthsShort,\r\n\t\t\trows = [],\r\n\t\t\ti = 0,\r\n\t\t\tmonths = [],\r\n\t\t\tclasses\r\n\t\t;\r\n\r\n\t\twhile (i < 12) {\r\n\t\t\tclasses = \"month\";\r\n\t\t\tif( i === month && this.props.viewDate.year() === date.year() )\r\n\t\t\t\tclasses += \" active\";\r\n\r\n\t\t\tmonths.push( DOM.td( {key: i, className: classes, onClick: this.props.setDate('month') }, monthsShort[ i ] ));\r\n\t\t\tif( months.length == 4 ){\r\n\t\t\t\trows.push( DOM.tr({ key: month + '_' + rows.length }, months) );\r\n\t\t\t\tmonths = [];\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t},\r\n\r\n\trender: function() {\r\n\t\treturn DOM.div({ className: 'rdtMonths' },[\r\n\t\t\tDOM.table({ key: 'a'}, DOM.thead({}, DOM.tr({},[\r\n\t\t\t\tDOM.th({ key: 'prev', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(1, 'years')}, '‹')),\r\n\t\t\t\tDOM.th({ key: 'year', className: 'switch', onClick: this.props.showView('years'), colSpan: 2 }, this.props.viewDate.year() ),\r\n\t\t\t\tDOM.th({ key: 'next', className: 'next' }, DOM.button({onClick: this.props.addTime(1, 'years')}, '›'))\r\n\t\t\t]))),\r\n\t\t\tDOM.table({ key: 'months'}, DOM.tbody({ key: 'b'}, this.renderMonths()))\r\n\t\t]);\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerMonths;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/MonthsView.js\n ** module id = 6\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/MonthsView.js?");
   eval("'use strict';\r\n\r\nvar React = __webpack_require__(2),\r\nmoment = __webpack_require__(5)\r\n;\r\n\r\nvar DOM = React.DOM;\r\nvar DateTimePickerMonths = React.createClass({\r\n\trender: function() {\r\n\t\treturn DOM.div({ className: 'rdtMonths' },[\r\n\t\t\tDOM.table({ key: 'a'}, DOM.thead({}, DOM.tr({},[\r\n\t\t\t\tDOM.th({ key: 'prev', className: 'prev' }, DOM.button({onClick: this.props.subtractTime(1, 'years')}, '‹')),\r\n\t\t\t\tDOM.th({ key: 'year', className: 'switch', onClick: this.props.showView('years'), colSpan: 2 }, this.props.viewDate.year() ),\r\n\t\t\t\tDOM.th({ key: 'next', className: 'next' }, DOM.button({onClick: this.props.addTime(1, 'years')}, '›'))\r\n\t\t\t]))),\r\n\t\t\tDOM.table({ key: 'months'}, DOM.tbody({ key: 'b'}, this.renderMonths()))\r\n\t\t]);\r\n\t},\r\n\r\n\trenderMonths: function() {\r\n\t\tvar date = this.props.selectedDate,\r\n\t\t\tmonth = date.month(),\r\n\t\t\tyear = this.props.viewDate.year(),\r\n\t\t\trows = [],\r\n\t\t\ti = 0,\r\n\t\t\tmonths = [],\r\n\t\t\trenderer = this.props.renderMonth || this.renderMonth,\r\n\t\t\tclasses, props\r\n\t\t;\r\n\r\n\t\twhile (i < 12) {\r\n\t\t\tclasses = \"month\";\r\n\t\t\tif( i === month && year === date.year() )\r\n\t\t\t\tclasses += \" active\";\r\n\r\n\t\t\tprops = {\r\n\t\t\t\tkey: i,\r\n\t\t\t\t'data-value': i,\r\n\t\t\t\tclassName: classes,\r\n\t\t\t\tonClick: this.props.setDate('month')\r\n\t\t\t};\r\n\r\n\t\t\tmonths.push( renderer( props, i, year, date.clone() ));\r\n\r\n\t\t\tif( months.length == 4 ){\r\n\t\t\t\trows.push( DOM.tr({ key: month + '_' + rows.length }, months) );\r\n\t\t\t\tmonths = [];\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t},\r\n\r\n\trenderMonth: function( props, month, year, selectedDate ) {\r\n\t\treturn DOM.td( props, selectedDate.localeData()._monthsShort[ month ] );\r\n\t}\r\n});\r\n\r\nmodule.exports = DateTimePickerMonths;\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/MonthsView.js\n ** module id = 6\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/MonthsView.js?");
/***/ },
/* 7 */