| | |
| | | /* eslint-disable */ |
| | | 'use strict'; |
| | | |
| | | var React = require('react'), |
| | |
| | | } |
| | | } |
| | | |
| | | var hours = date.format( 'H' ); |
| | | |
| | | var daypart = false; |
| | | if ( this.state !== null && this.props.timeFormat.toLowerCase().indexOf( ' a' ) !== -1 ) { |
| | | if ( this.props.timeFormat.indexOf( ' A' ) !== -1 ) { |
| | | daypart = ( this.state.hours >= 12 ) ? 'PM' : 'AM'; |
| | | daypart = ( hours >= 12 ) ? 'PM' : 'AM'; |
| | | } else { |
| | | daypart = ( this.state.hours >= 12 ) ? 'pm' : 'am'; |
| | | daypart = ( hours >= 12 ) ? 'pm' : 'am'; |
| | | } |
| | | } |
| | | |
| | | return { |
| | | hours: date.format( 'H' ), |
| | | hours: hours, |
| | | minutes: date.format( 'mm' ), |
| | | seconds: date.format( 'ss' ), |
| | | milliseconds: date.format( 'SSS' ), |
| | |
| | | |
| | | var date = this.props.selectedDate || this.props.viewDate; |
| | | return React.createElement('thead', { key: 'h' }, React.createElement('tr', {}, |
| | | React.createElement('th', { className: 'rdtSwitch', colSpan: 4, onClick: this.props.showView( 'days' ) }, date.format( this.props.dateFormat ) ) |
| | | React.createElement('th', { className: 'rdtSwitch', colspan: 4, onClick: this.props.showView( 'days' ) }, date.format( this.props.dateFormat ) ) |
| | | )); |
| | | }, |
| | | |
| | |
| | | clearInterval( me.increaseTimer ); |
| | | me.props.setTime( type, me.state[ type ] ); |
| | | document.body.removeEventListener( 'mouseup', me.mouseUpListener ); |
| | | document.body.removeEventListener( 'touchend', me.mouseUpListener ); |
| | | }; |
| | | |
| | | document.body.addEventListener( 'mouseup', me.mouseUpListener ); |
| | | document.body.addEventListener( 'touchend', me.mouseUpListener ); |
| | | }; |
| | | }, |
| | | |
| | |
| | | })); |
| | | |
| | | module.exports = DateTimePickerTime; |
| | | /* eslint-enable */ |