diff --git a/DateTime.js b/DateTime.js index 669ede183..8159470b9 100644 --- a/DateTime.js +++ b/DateTime.js @@ -158,7 +158,7 @@ var Datetime = createClass({ if ( updatedState.open === undefined ) { if ( typeof nextProps.open !== 'undefined' ) { updatedState.open = nextProps.open; - } else if ( this.props.closeOnSelect && this.state.currentView !== viewModes.TIME ) { + } else if ( this.props.closeOnSelect) { updatedState.open = false; } else { updatedState.open = this.state.open; diff --git a/src/TimeView.js b/src/TimeView.js index d341af97b..ed3e88cd7 100644 --- a/src/TimeView.js +++ b/src/TimeView.js @@ -58,9 +58,9 @@ var DateTimePickerTime = createClass({ } } return React.createElement('div', { key: type, className: 'rdtCounter' }, [ - React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ), + React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'increase', type ), onTouchStart:this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ), React.createElement('div', { key: 'c', className: 'rdtCount' }, value ), - React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'decrease', type ), onContextMenu: this.disableContextMenu }, '▼' ) + React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'decrease', type ), onTouchStart:this.onStartClicking( 'decrease', type ) , onContextMenu: this.disableContextMenu }, '▼' ) ]); } return ''; @@ -68,9 +68,9 @@ var DateTimePickerTime = createClass({ renderDayPart: function() { return React.createElement('div', { key: 'dayPart', className: 'rdtCounter' }, [ - React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ), + React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'),onTouchStart: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ), React.createElement('div', { key: this.state.daypart, className: 'rdtCount' }, this.state.daypart ), - React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' ) + React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'),onTouchStart: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' ) ]); },