From 8367627f485d9077c57cffa54f66d03fa62e1df9 Mon Sep 17 00:00:00 2001 From: burtontanner Date: Thu, 7 Mar 2019 10:49:05 -0700 Subject: [PATCH 1/2] Allow close when the time picker is up Allow close when the time picker is up --- DateTime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From f9de20cefcfcd21c8fe2902777e2b2d274dc6a43 Mon Sep 17 00:00:00 2001 From: burtontanner Date: Mon, 11 Mar 2019 16:39:35 -0600 Subject: [PATCH 2/2] Update TimeView.js fix for mobile --- src/TimeView.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 }, '▼' ) ]); },