@@ -59,19 +59,19 @@ var DateTimePickerTime = onClickOutside( createClass({
5959 }
6060 }
6161 return React . createElement ( 'div' , { key : type , className : 'rdtCounter' } , [
62- React . createElement ( 'span' , { key : 'up' , className : 'rdtBtn' , onMouseDown : this . onStartClicking ( 'increase' , type ) , onContextMenu : this . disableContextMenu } , '▲' ) ,
62+ React . createElement ( 'span' , { key : 'up' , className : 'rdtBtn' , onTouchStart : this . onStartClicking ( 'increase' , type ) , onMouseDown : this . onStartClicking ( 'increase' , type ) , onContextMenu : this . disableContextMenu } , '▲' ) ,
6363 React . createElement ( 'div' , { key : 'c' , className : 'rdtCount' } , value ) ,
64- React . createElement ( 'span' , { key : 'do' , className : 'rdtBtn' , onMouseDown : this . onStartClicking ( 'decrease' , type ) , onContextMenu : this . disableContextMenu } , '▼' )
64+ React . createElement ( 'span' , { key : 'do' , className : 'rdtBtn' , onTouchStart : this . onStartClicking ( 'decrease' , type ) , onMouseDown : this . onStartClicking ( 'decrease' , type ) , onContextMenu : this . disableContextMenu } , '▼' )
6565 ] ) ;
6666 }
6767 return '' ;
6868 } ,
6969
7070 renderDayPart : function ( ) {
7171 return React . createElement ( 'div' , { key : 'dayPart' , className : 'rdtCounter' } , [
72- React . createElement ( 'span' , { key : 'up' , className : 'rdtBtn' , onMouseDown : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onContextMenu : this . disableContextMenu } , '▲' ) ,
72+ React . createElement ( 'span' , { key : 'up' , className : 'rdtBtn' , onTouchStart : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onMouseDown : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onContextMenu : this . disableContextMenu } , '▲' ) ,
7373 React . createElement ( 'div' , { key : this . state . daypart , className : 'rdtCount' } , this . state . daypart ) ,
74- React . createElement ( 'span' , { key : 'do' , className : 'rdtBtn' , onMouseDown : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onContextMenu : this . disableContextMenu } , '▼' )
74+ React . createElement ( 'span' , { key : 'do' , className : 'rdtBtn' , onTouchStart : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onMouseDown : this . onStartClicking ( 'toggleDayPart' , 'hours' ) , onContextMenu : this . disableContextMenu } , '▼' )
7575 ] ) ;
7676 } ,
7777
@@ -181,9 +181,11 @@ var DateTimePickerTime = onClickOutside( createClass({
181181 clearInterval ( me . increaseTimer ) ;
182182 me . props . setTime ( type , me . state [ type ] ) ;
183183 document . body . removeEventListener ( 'mouseup' , me . mouseUpListener ) ;
184+ document . body . removeEventListener ( 'touchend' , me . mouseUpListener ) ;
184185 } ;
185186
186187 document . body . addEventListener ( 'mouseup' , me . mouseUpListener ) ;
188+ document . body . addEventListener ( 'touchend' , me . mouseUpListener ) ;
187189 } ;
188190 } ,
189191
0 commit comments