File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ DateTimeField = React.createClass({
9797 var target = e . target ;
9898 if ( target . className && ! target . className . match ( / d i s a b l e d / g) ) {
9999 var month ;
100- if ( target . className . includes ( "new" ) ) month = this . state . viewDate . month ( ) + 1 ;
101- else if ( target . className . includes ( "old" ) ) month = this . state . viewDate . month ( ) - 1 ;
100+ if ( target . className . indexOf ( "new" ) >= 0 ) month = this . state . viewDate . month ( ) + 1 ;
101+ else if ( target . className . indexOf ( "old" ) >= 0 ) month = this . state . viewDate . month ( ) - 1 ;
102102 else month = this . state . viewDate . month ( ) ;
103103 return this . setState ( {
104104 selectedDate : this . state . viewDate . clone ( ) . month ( month ) . date ( parseInt ( e . target . innerHTML ) ) . hour ( this . state . selectedDate . hours ( ) ) . minute ( this . state . selectedDate . minutes ( ) )
You can’t perform that action at this time.
0 commit comments