@@ -62,8 +62,8 @@ return /******/ (function(modules) { // webpackBootstrap
62
62
'use strict' ;
63
63
64
64
var assign = __webpack_require__ ( 1 ) ,
65
- PropTypes = __webpack_require__ ( 2 ) ,
66
- createClass = __webpack_require__ ( 11 ) ,
65
+ PropTypes = __webpack_require__ ( 2 ) ,
66
+ createClass = __webpack_require__ ( 11 ) ,
67
67
moment = __webpack_require__ ( 16 ) ,
68
68
React = __webpack_require__ ( 12 ) ,
69
69
CalendarContainer = __webpack_require__ ( 17 )
@@ -77,6 +77,7 @@ return /******/ (function(modules) { // webpackBootstrap
77
77
onFocus : TYPES . func ,
78
78
onBlur : TYPES . func ,
79
79
onChange : TYPES . func ,
80
+ onViewModeChange : TYPES . func ,
80
81
locale : TYPES . string ,
81
82
utc : TYPES . bool ,
82
83
input : TYPES . bool ,
@@ -102,6 +103,7 @@ return /******/ (function(modules) { // webpackBootstrap
102
103
onFocus : nof ,
103
104
onBlur : nof ,
104
105
onChange : nof ,
106
+ onViewModeChange : nof ,
105
107
timeFormat : true ,
106
108
timeConstraints : { } ,
107
109
dateFormat : true ,
@@ -162,13 +164,11 @@ return /******/ (function(modules) { // webpackBootstrap
162
164
} ,
163
165
164
166
getUpdateOn : function ( formats ) {
165
- if ( formats . date . match ( / [ l L D ] / ) ) {
167
+ if ( formats . date . match ( / [ l L D ] / ) ) {
166
168
return 'days' ;
167
- }
168
- else if ( formats . date . indexOf ( 'M' ) !== - 1 ) {
169
+ } else if ( formats . date . indexOf ( 'M' ) !== - 1 ) {
169
170
return 'months' ;
170
- }
171
- else if ( formats . date . indexOf ( 'Y' ) !== - 1 ) {
171
+ } else if ( formats . date . indexOf ( 'Y' ) !== - 1 ) {
172
172
return 'years' ;
173
173
}
174
174
@@ -266,8 +266,7 @@ return /******/ (function(modules) { // webpackBootstrap
266
266
if ( localMoment . isValid ( ) && ! this . props . value ) {
267
267
update . selectedDate = localMoment ;
268
268
update . viewDate = localMoment . clone ( ) . startOf ( 'month' ) ;
269
- }
270
- else {
269
+ } else {
271
270
update . selectedDate = null ;
272
271
}
273
272
@@ -285,6 +284,7 @@ return /******/ (function(modules) { // webpackBootstrap
285
284
showView : function ( view ) {
286
285
var me = this ;
287
286
return function ( ) {
287
+ me . state . currentView !== view && me . props . onViewModeChange ( view ) ;
288
288
me . setState ( { currentView : view } ) ;
289
289
} ;
290
290
} ,
@@ -301,6 +301,7 @@ return /******/ (function(modules) { // webpackBootstrap
301
301
viewDate : me . state . viewDate . clone ( ) [ type ] ( parseInt ( e . target . getAttribute ( 'data-value' ) , 10 ) ) . startOf ( type ) ,
302
302
currentView : nextViews [ type ]
303
303
} ) ;
304
+ me . props . onViewModeChange ( nextViews [ type ] ) ;
304
305
} ;
305
306
} ,
306
307
@@ -357,7 +358,7 @@ return /******/ (function(modules) { // webpackBootstrap
357
358
viewDate = this . state . viewDate ,
358
359
currentDate = this . state . selectedDate || viewDate ,
359
360
date
360
- ;
361
+ ;
361
362
362
363
if ( target . className . indexOf ( 'rdtDay' ) !== - 1 ) {
363
364
if ( target . className . indexOf ( 'rdtNew' ) !== - 1 )
@@ -2670,6 +2671,8 @@ return /******/ (function(modules) { // webpackBootstrap
2670
2671
/* 17 */
2671
2672
/***/ ( function ( module , exports , __webpack_require__ ) {
2672
2673
2674
+ 'use strict' ;
2675
+
2673
2676
var React = __webpack_require__ ( 12 ) ,
2674
2677
createClass = __webpack_require__ ( 11 ) ,
2675
2678
DaysView = __webpack_require__ ( 18 ) ,
@@ -2703,7 +2706,7 @@ return /******/ (function(modules) { // webpackBootstrap
2703
2706
var React = __webpack_require__ ( 12 ) ,
2704
2707
createClass = __webpack_require__ ( 11 ) ,
2705
2708
moment = __webpack_require__ ( 16 ) ,
2706
- onClickOutside = __webpack_require__ ( 19 )
2709
+ onClickOutside = __webpack_require__ ( 19 )
2707
2710
;
2708
2711
2709
2712
var DateTimePickerDays = onClickOutside ( createClass ( {
0 commit comments