@@ -212,8 +212,8 @@ export default React.createClass({
212
212
cellPadding : '5px' ,
213
213
dayLabels : [ 'Sun' , 'Mon' , 'Tue' , 'Wed' , 'Thu' , 'Fri' , 'Sat' ] ,
214
214
monthLabels : [ 'January' , 'February' , 'March' , 'April' ,
215
- 'May' , 'June' , 'July' , 'August' , 'September' ,
216
- 'October' , 'November' , 'December' ] ,
215
+ 'May' , 'June' , 'July' , 'August' , 'September' ,
216
+ 'October' , 'November' , 'December' ] ,
217
217
clearButtonElement : '×' ,
218
218
previousButtonElement : '<' ,
219
219
nextButtonElement : '>' ,
@@ -228,12 +228,12 @@ export default React.createClass({
228
228
} ,
229
229
230
230
getInitialState ( ) {
231
- if ( this . props . value && this . props . defaultValue ) {
232
- throw new Error ( " Conflicting DatePicker properties 'value' and 'defaultValue'" ) ;
231
+ if ( this . props . value && this . props . defaultValue ) {
232
+ throw new Error ( ' Conflicting DatePicker properties \ 'value\ ' and \ 'defaultValue\'' ) ;
233
233
}
234
- var state = this . makeDateValues ( this . props . value || this . props . defaultValue ) ;
235
- if ( this . props . weekStartsOnMonday ) {
236
- state . dayLabels = this . props . dayLabels . slice ( 1 ) . concat ( this . props . dayLabels . slice ( 0 , 1 ) )
234
+ const state = this . makeDateValues ( this . props . value || this . props . defaultValue ) ;
235
+ if ( this . props . weekStartsOnMonday ) {
236
+ state . dayLabels = this . props . dayLabels . slice ( 1 ) . concat ( this . props . dayLabels . slice ( 0 , 1 ) ) ;
237
237
} else {
238
238
state . dayLabels = this . props . dayLabels ;
239
239
}
@@ -270,7 +270,7 @@ export default React.createClass({
270
270
this . setState ( this . makeDateValues ( null ) ) ;
271
271
}
272
272
273
- if ( this . props . onChange ) {
273
+ if ( this . props . onChange ) {
274
274
this . props . onChange ( null , null ) ;
275
275
}
276
276
} ,
@@ -436,7 +436,7 @@ export default React.createClass({
436
436
value : selectedDate . toISOString ( )
437
437
} ) ;
438
438
439
- if ( this . props . onChange ) {
439
+ if ( this . props . onChange ) {
440
440
this . props . onChange ( selectedDate . toISOString ( ) , inputValue ) ;
441
441
}
442
442
}
@@ -469,7 +469,7 @@ export default React.createClass({
469
469
this . props . onBlur ( event ) ;
470
470
}
471
471
472
- if ( this . props . onChange ) {
472
+ if ( this . props . onChange ) {
473
473
this . props . onChange ( newSelectedDate . toISOString ( ) , inputValue ) ;
474
474
}
475
475
} ,
0 commit comments