@@ -160,8 +160,8 @@ return /******/ (function(modules) { // webpackBootstrap
160
160
var target = e . target ;
161
161
if ( target . className && ! target . className . match ( / d i s a b l e d / g) ) {
162
162
var month ;
163
- if ( target . className . includes ( "new" ) ) month = this . state . viewDate . month ( ) + 1 ;
164
- else if ( target . className . includes ( "old" ) ) month = this . state . viewDate . month ( ) - 1 ;
163
+ if ( target . className . indexOf ( "new" ) >= 0 ) month = this . state . viewDate . month ( ) + 1 ;
164
+ else if ( target . className . indexOf ( "old" ) >= 0 ) month = this . state . viewDate . month ( ) - 1 ;
165
165
else month = this . state . viewDate . month ( ) ;
166
166
return this . setState ( {
167
167
selectedDate : this . state . viewDate . clone ( ) . month ( month ) . date ( parseInt ( e . target . innerHTML ) ) . hour ( this . state . selectedDate . hours ( ) ) . minute ( this . state . selectedDate . minutes ( ) )
@@ -440,6 +440,8 @@ return /******/ (function(modules) { // webpackBootstrap
440
440
441
441
var Constants = __webpack_require__ ( 6 ) ;
442
442
443
+ var classnames = __webpack_require__ ( 9 ) ;
444
+
443
445
DateTimePicker = React . createClass ( { displayName : "DateTimePicker" ,
444
446
propTypes : {
445
447
showDatePicker : React . PropTypes . bool ,
@@ -527,7 +529,7 @@ return /******/ (function(modules) { // webpackBootstrap
527
529
} ,
528
530
render : function ( ) {
529
531
return (
530
- React . createElement ( "div" , { className : React . addons . classSet ( this . props . widgetClasses ) , style : this . props . widgetStyle } ,
532
+ React . createElement ( "div" , { className : classnames ( this . props . widgetClasses ) , style : this . props . widgetStyle } ,
531
533
532
534
React . createElement ( "ul" , { className : "list-unstyled" } ,
533
535
@@ -566,11 +568,11 @@ return /******/ (function(modules) { // webpackBootstrap
566
568
567
569
React = __webpack_require__ ( 2 ) ;
568
570
569
- DateTimePickerDays = __webpack_require__ ( 9 ) ;
571
+ DateTimePickerDays = __webpack_require__ ( 10 ) ;
570
572
571
- DateTimePickerMonths = __webpack_require__ ( 10 ) ;
573
+ DateTimePickerMonths = __webpack_require__ ( 11 ) ;
572
574
573
- DateTimePickerYears = __webpack_require__ ( 11 ) ;
575
+ DateTimePickerYears = __webpack_require__ ( 12 ) ;
574
576
575
577
DateTimePickerDate = React . createClass ( { displayName : "DateTimePickerDate" ,
576
578
propTypes : {
@@ -715,9 +717,9 @@ return /******/ (function(modules) { // webpackBootstrap
715
717
716
718
React = __webpack_require__ ( 2 ) ;
717
719
718
- DateTimePickerMinutes = __webpack_require__ ( 12 ) ;
720
+ DateTimePickerMinutes = __webpack_require__ ( 13 ) ;
719
721
720
- DateTimePickerHours = __webpack_require__ ( 13 ) ;
722
+ DateTimePickerHours = __webpack_require__ ( 14 ) ;
721
723
722
724
var Glyphicon = __webpack_require__ ( 4 ) . Glyphicon ;
723
725
@@ -835,6 +837,61 @@ return /******/ (function(modules) { // webpackBootstrap
835
837
836
838
/***/ } ,
837
839
/* 9 */
840
+ /***/ function ( module , exports , __webpack_require__ ) {
841
+
842
+ var __WEBPACK_AMD_DEFINE_RESULT__ ; /*!
843
+ Copyright (c) 2015 Jed Watson.
844
+ Licensed under the MIT License (MIT), see
845
+ http://jedwatson.github.io/classnames
846
+ */
847
+
848
+ ( function ( ) {
849
+ 'use strict' ;
850
+
851
+ function classNames ( ) {
852
+
853
+ var classes = '' ;
854
+
855
+ for ( var i = 0 ; i < arguments . length ; i ++ ) {
856
+ var arg = arguments [ i ] ;
857
+ if ( ! arg ) continue ;
858
+
859
+ var argType = typeof arg ;
860
+
861
+ if ( 'string' === argType || 'number' === argType ) {
862
+ classes += ' ' + arg ;
863
+
864
+ } else if ( Array . isArray ( arg ) ) {
865
+ classes += ' ' + classNames . apply ( null , arg ) ;
866
+
867
+ } else if ( 'object' === argType ) {
868
+ for ( var key in arg ) {
869
+ if ( arg . hasOwnProperty ( key ) && arg [ key ] ) {
870
+ classes += ' ' + key ;
871
+ }
872
+ }
873
+ }
874
+ }
875
+
876
+ return classes . substr ( 1 ) ;
877
+ }
878
+
879
+ if ( typeof module !== 'undefined' && module . exports ) {
880
+ module . exports = classNames ;
881
+ } else if ( true ) {
882
+ // AMD. Register as an anonymous module.
883
+ ! ( __WEBPACK_AMD_DEFINE_RESULT__ = function ( ) {
884
+ return classNames ;
885
+ } . call ( exports , __webpack_require__ , exports , module ) , __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && ( module . exports = __WEBPACK_AMD_DEFINE_RESULT__ ) ) ;
886
+ } else {
887
+ window . classNames = classNames ;
888
+ }
889
+
890
+ } ( ) ) ;
891
+
892
+
893
+ /***/ } ,
894
+ /* 10 */
838
895
/***/ function ( module , exports , __webpack_require__ ) {
839
896
840
897
var DateTimePickerDays , React , moment ;
@@ -843,6 +900,8 @@ return /******/ (function(modules) { // webpackBootstrap
843
900
844
901
moment = __webpack_require__ ( 3 ) ;
845
902
903
+ var classnames = __webpack_require__ ( 9 ) ;
904
+
846
905
DateTimePickerDays = React . createClass ( { displayName : "DateTimePickerDays" ,
847
906
propTypes : {
848
907
subtractMonth : React . PropTypes . func . isRequired ,
@@ -907,7 +966,7 @@ return /******/ (function(modules) { // webpackBootstrap
907
966
}
908
967
}
909
968
}
910
- cells . push ( React . createElement ( "td" , { key : prevMonth . month ( ) + '-' + prevMonth . date ( ) , className : React . addons . classSet ( classes ) , onClick : this . props . setSelectedDate } , prevMonth . date ( ) ) ) ;
969
+ cells . push ( React . createElement ( "td" , { key : prevMonth . month ( ) + '-' + prevMonth . date ( ) , className : classnames ( classes ) , onClick : this . props . setSelectedDate } , prevMonth . date ( ) ) ) ;
911
970
if ( prevMonth . weekday ( ) === moment ( ) . endOf ( 'week' ) . weekday ( ) ) {
912
971
row = React . createElement ( "tr" , { key : prevMonth . month ( ) + '-' + prevMonth . date ( ) } , cells ) ;
913
972
html . push ( row ) ;
@@ -960,7 +1019,7 @@ return /******/ (function(modules) { // webpackBootstrap
960
1019
961
1020
962
1021
/***/ } ,
963
- /* 10 */
1022
+ /* 11 */
964
1023
/***/ function ( module , exports , __webpack_require__ ) {
965
1024
966
1025
var DateTimePickerMonths , React , moment ;
@@ -969,6 +1028,8 @@ return /******/ (function(modules) { // webpackBootstrap
969
1028
970
1029
moment = __webpack_require__ ( 3 ) ;
971
1030
1031
+ var classnames = __webpack_require__ ( 9 ) ;
1032
+
972
1033
DateTimePickerMonths = React . createClass ( { displayName : "DateTimePickerMonths" ,
973
1034
propTypes : {
974
1035
subtractYear : React . PropTypes . func . isRequired ,
@@ -989,7 +1050,7 @@ return /******/ (function(modules) { // webpackBootstrap
989
1050
month : true ,
990
1051
'active' : i === month && this . props . viewDate . year ( ) === this . props . selectedDate . year ( )
991
1052
} ;
992
- months . push ( React . createElement ( "span" , { key : i , className : React . addons . classSet ( classes ) , onClick : this . props . setViewMonth } , monthsShort [ i ] ) ) ;
1053
+ months . push ( React . createElement ( "span" , { key : i , className : classnames ( classes ) , onClick : this . props . setViewMonth } , monthsShort [ i ] ) ) ;
993
1054
i ++ ;
994
1055
}
995
1056
return months ;
@@ -1023,13 +1084,15 @@ return /******/ (function(modules) { // webpackBootstrap
1023
1084
1024
1085
1025
1086
/***/ } ,
1026
- /* 11 */
1087
+ /* 12 */
1027
1088
/***/ function ( module , exports , __webpack_require__ ) {
1028
1089
1029
1090
var DateTimePickerYears , React ;
1030
1091
1031
1092
React = __webpack_require__ ( 2 ) ;
1032
1093
1094
+ var classnames = __webpack_require__ ( 9 ) ;
1095
+
1033
1096
DateTimePickerYears = React . createClass ( { displayName : "DateTimePickerYears" ,
1034
1097
propTypes : {
1035
1098
subtractDecade : React . PropTypes . func . isRequired ,
@@ -1050,7 +1113,7 @@ return /******/ (function(modules) { // webpackBootstrap
1050
1113
old : i === - 1 | i === 10 ,
1051
1114
active : this . props . selectedDate . year ( ) === year
1052
1115
} ;
1053
- years . push ( React . createElement ( "span" , { key : year , className : React . addons . classSet ( classes ) , onClick : this . props . setViewYear } , year ) ) ;
1116
+ years . push ( React . createElement ( "span" , { key : year , className : classnames ( classes ) , onClick : this . props . setViewYear } , year ) ) ;
1054
1117
year ++ ;
1055
1118
i ++ ;
1056
1119
}
@@ -1087,7 +1150,7 @@ return /******/ (function(modules) { // webpackBootstrap
1087
1150
1088
1151
1089
1152
/***/ } ,
1090
- /* 12 */
1153
+ /* 13 */
1091
1154
/***/ function ( module , exports , __webpack_require__ ) {
1092
1155
1093
1156
var DateTimePickerMinutes , React ;
@@ -1158,7 +1221,7 @@ return /******/ (function(modules) { // webpackBootstrap
1158
1221
1159
1222
1160
1223
/***/ } ,
1161
- /* 13 */
1224
+ /* 14 */
1162
1225
/***/ function ( module , exports , __webpack_require__ ) {
1163
1226
1164
1227
var DateTimePickerHours , React ;
0 commit comments