|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | 3 | var assign = require('object-assign'), |
4 | | - PropTypes = require('prop-types'), |
5 | | - createClass = require('create-react-class'), |
| 4 | + PropTypes = require('prop-types'), |
| 5 | + createClass = require('create-react-class'), |
6 | 6 | moment = require('moment'), |
7 | 7 | React = require('react'), |
8 | 8 | CalendarContainer = require('./src/CalendarContainer') |
@@ -101,13 +101,11 @@ var Datetime = createClass({ |
101 | 101 | }, |
102 | 102 |
|
103 | 103 | getUpdateOn: function( formats ) { |
104 | | - if ( formats.date.match(/[lLD]/) ) { |
| 104 | + if ( formats.date.match(/[lLD]/) ) { |
105 | 105 | return 'days'; |
106 | | - } |
107 | | - else if ( formats.date.indexOf('M') !== -1 ) { |
| 106 | + } else if ( formats.date.indexOf('M') !== -1 ) { |
108 | 107 | return 'months'; |
109 | | - } |
110 | | - else if ( formats.date.indexOf('Y') !== -1 ) { |
| 108 | + } else if ( formats.date.indexOf('Y') !== -1 ) { |
111 | 109 | return 'years'; |
112 | 110 | } |
113 | 111 |
|
@@ -205,8 +203,7 @@ var Datetime = createClass({ |
205 | 203 | if ( localMoment.isValid() && !this.props.value ) { |
206 | 204 | update.selectedDate = localMoment; |
207 | 205 | update.viewDate = localMoment.clone().startOf('month'); |
208 | | - } |
209 | | - else { |
| 206 | + } else { |
210 | 207 | update.selectedDate = null; |
211 | 208 | } |
212 | 209 |
|
@@ -296,7 +293,7 @@ var Datetime = createClass({ |
296 | 293 | viewDate = this.state.viewDate, |
297 | 294 | currentDate = this.state.selectedDate || viewDate, |
298 | 295 | date |
299 | | - ; |
| 296 | + ; |
300 | 297 |
|
301 | 298 | if (target.className.indexOf('rdtDay') !== -1) { |
302 | 299 | if (target.className.indexOf('rdtNew') !== -1) |
|
0 commit comments