| | |
| | | 'use strict'; |
| | | |
| | | require('classlist-polyfill'); |
| | | |
| | | var assign = require('object-assign'), |
| | | React = require('react'), |
| | | DaysView = require('./src/DaysView'), |
| | |
| | | getDefaultProps: function() { |
| | | var nof = function(){}; |
| | | return { |
| | | className: 'form-control', |
| | | date: new Date(), |
| | | viewMode: 'days', |
| | | inputProps: {}, |
| | |
| | | ; |
| | | return function( e ){ |
| | | me.setState({ |
| | | viewDate: me.state.viewDate.clone()[ type ]( parseInt(e.target.dataset.value) ).startOf( type ), |
| | | viewDate: me.state.viewDate.clone()[ type ]( parseInt(e.target.getAttribute('data-value')) ).startOf( type ), |
| | | currentView: nextViews[ type ] |
| | | }); |
| | | }; |
| | |
| | | |
| | | date = this.state.viewDate.clone() |
| | | .month( this.state.viewDate.month() + modifier ) |
| | | .date( parseInt( target.dataset.value ) ) |
| | | .date( parseInt( target.getAttribute('data-value') ) ) |
| | | .hours( currentDate.hours() ) |
| | | .minutes( currentDate.minutes() ) |
| | | .seconds( currentDate.seconds() ) |
| | |
| | | children = [ DOM.input( assign({ |
| | | key: 'i', |
| | | type:'text', |
| | | className:'form-control', |
| | | className: 'form-control', |
| | | onFocus: this.openCalendar, |
| | | onChange: this.onChange, |
| | | value: this.state.inputValue |