@@ -62,8 +62,8 @@ return /******/ (function(modules) { // webpackBootstrap
6262 'use strict' ;
6363
6464 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 ) ,
6767 moment = __webpack_require__ ( 16 ) ,
6868 React = __webpack_require__ ( 12 ) ,
6969 CalendarContainer = __webpack_require__ ( 17 )
@@ -77,6 +77,7 @@ return /******/ (function(modules) { // webpackBootstrap
7777 onFocus : TYPES . func ,
7878 onBlur : TYPES . func ,
7979 onChange : TYPES . func ,
80+ onViewModeChange : TYPES . func ,
8081 locale : TYPES . string ,
8182 utc : TYPES . bool ,
8283 input : TYPES . bool ,
@@ -102,6 +103,7 @@ return /******/ (function(modules) { // webpackBootstrap
102103 onFocus : nof ,
103104 onBlur : nof ,
104105 onChange : nof ,
106+ onViewModeChange : nof ,
105107 timeFormat : true ,
106108 timeConstraints : { } ,
107109 dateFormat : true ,
@@ -162,13 +164,11 @@ return /******/ (function(modules) { // webpackBootstrap
162164 } ,
163165
164166 getUpdateOn : function ( formats ) {
165- if ( formats . date . match ( / [ l L D ] / ) ) {
167+ if ( formats . date . match ( / [ l L D ] / ) ) {
166168 return 'days' ;
167- }
168- else if ( formats . date . indexOf ( 'M' ) !== - 1 ) {
169+ } else if ( formats . date . indexOf ( 'M' ) !== - 1 ) {
169170 return 'months' ;
170- }
171- else if ( formats . date . indexOf ( 'Y' ) !== - 1 ) {
171+ } else if ( formats . date . indexOf ( 'Y' ) !== - 1 ) {
172172 return 'years' ;
173173 }
174174
@@ -266,8 +266,7 @@ return /******/ (function(modules) { // webpackBootstrap
266266 if ( localMoment . isValid ( ) && ! this . props . value ) {
267267 update . selectedDate = localMoment ;
268268 update . viewDate = localMoment . clone ( ) . startOf ( 'month' ) ;
269- }
270- else {
269+ } else {
271270 update . selectedDate = null ;
272271 }
273272
@@ -285,6 +284,7 @@ return /******/ (function(modules) { // webpackBootstrap
285284 showView : function ( view ) {
286285 var me = this ;
287286 return function ( ) {
287+ me . state . currentView !== view && me . props . onViewModeChange ( view ) ;
288288 me . setState ( { currentView : view } ) ;
289289 } ;
290290 } ,
@@ -301,6 +301,7 @@ return /******/ (function(modules) { // webpackBootstrap
301301 viewDate : me . state . viewDate . clone ( ) [ type ] ( parseInt ( e . target . getAttribute ( 'data-value' ) , 10 ) ) . startOf ( type ) ,
302302 currentView : nextViews [ type ]
303303 } ) ;
304+ me . props . onViewModeChange ( nextViews [ type ] ) ;
304305 } ;
305306 } ,
306307
@@ -357,7 +358,7 @@ return /******/ (function(modules) { // webpackBootstrap
357358 viewDate = this . state . viewDate ,
358359 currentDate = this . state . selectedDate || viewDate ,
359360 date
360- ;
361+ ;
361362
362363 if ( target . className . indexOf ( 'rdtDay' ) !== - 1 ) {
363364 if ( target . className . indexOf ( 'rdtNew' ) !== - 1 )
@@ -2670,6 +2671,8 @@ return /******/ (function(modules) { // webpackBootstrap
26702671/* 17 */
26712672/***/ ( function ( module , exports , __webpack_require__ ) {
26722673
2674+ 'use strict' ;
2675+
26732676 var React = __webpack_require__ ( 12 ) ,
26742677 createClass = __webpack_require__ ( 11 ) ,
26752678 DaysView = __webpack_require__ ( 18 ) ,
@@ -2703,7 +2706,7 @@ return /******/ (function(modules) { // webpackBootstrap
27032706 var React = __webpack_require__ ( 12 ) ,
27042707 createClass = __webpack_require__ ( 11 ) ,
27052708 moment = __webpack_require__ ( 16 ) ,
2706- onClickOutside = __webpack_require__ ( 19 )
2709+ onClickOutside = __webpack_require__ ( 19 )
27072710 ;
27082711
27092712 var DateTimePickerDays = onClickOutside ( createClass ( {
0 commit comments