Anna Kurylo
2018-10-16 99929e8c706aa7f6196ac4e02df1c04449feee7a
src/DaysView.js
@@ -1,10 +1,10 @@
'use strict';
var React = require('react'),
    createClass = require('create-react-class'),
   createClass = require('create-react-class'),
   moment = require('moment'),
   onClickOutside = require('react-onclickoutside')
;
   onClickOutside = require('react-onclickoutside').default
   ;
var DateTimePickerDays = onClickOutside( createClass({
   render: function() {
@@ -12,13 +12,13 @@
         date = this.props.viewDate,
         locale = date.localeData(),
         tableChildren
      ;
         ;
      tableChildren = [
         React.createElement('thead', { key: 'th' }, [
            React.createElement('tr', { key: 'h' }, [
               React.createElement('th', { key: 'p', className: 'rdtPrev', onClick: this.props.subtractTime( 1, 'months' )}, React.createElement('span', {}, '‹' )),
               React.createElement('th', { key: 's', className: 'rdtSwitch', onClick: this.props.showView( 'months' ), colSpan: 5, 'data-value': this.props.viewDate.month() }, locale.months( date ) + ' ' + date.year() ),
               React.createElement('th', { key: 's', className: 'rdtSwitch', onClick: this.props.showView( 'months' ), colspan: 5, 'data-value': this.props.viewDate.month() }, locale.months( date ) + ' ' + date.year() ),
               React.createElement('th', { key: 'n', className: 'rdtNext', onClick: this.props.addTime( 1, 'months' )}, React.createElement('span', {}, '›' ))
            ]),
            React.createElement('tr', { key: 'd'}, this.getDaysOfWeek( locale ).map( function( day, index ) { return React.createElement('th', { key: day + index, className: 'dow'}, day ); }) )
@@ -44,7 +44,7 @@
         first = locale.firstDayOfWeek(),
         dow = [],
         i = 0
      ;
         ;
      days.forEach( function( day ) {
         dow[ (7 + ( i++ ) - first) % 7 ] = day;
@@ -64,7 +64,7 @@
         renderer = this.props.renderDay || this.renderDay,
         isValid = this.props.isValidDate || this.alwaysValidDate,
         classes, isDisabled, dayProps, currentDate
      ;
         ;
      // Go to the last week of the previous month
      prevMonth.date( prevMonth.daysInMonth() ).startOf( 'week' );
@@ -127,7 +127,7 @@
      return React.createElement('tfoot', { key: 'tf'},
         React.createElement('tr', {},
            React.createElement('td', { onClick: this.props.showView( 'time' ), colSpan: 7, className: 'rdtTimeToggle' }, date.format( this.props.timeFormat ))
            React.createElement('td', { onClick: this.props.showView( 'time' ), colspan: 7, className: 'rdtTimeToggle' }, date.format( this.props.timeFormat ))
         )
      );
   },
@@ -136,9 +136,9 @@
      return 1;
   },
  handleClickOutside: function() {
    this.props.handleClickOutside();
  }
   handleClickOutside: function() {
      this.props.handleClickOutside();
   }
}));
module.exports = DateTimePickerDays;