diff --git a/src/TimeView.js b/src/TimeView.js index 54887e2fb..d41df2f7c 100644 --- a/src/TimeView.js +++ b/src/TimeView.js @@ -57,9 +57,9 @@ var DateTimePickerTime = onClickOutside( React.createClass({ } } return DOM.div({ key: type, className: 'rdtCounter' }, [ - DOM.span({ key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'increase', type ) }, '▲' ), + DOM.span({ key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ), DOM.div({ key: 'c', className: 'rdtCount' }, value ), - DOM.span({ key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'decrease', type ) }, '▼' ) + DOM.span({ key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'decrease', type ), onContextMenu: this.disableContextMenu }, '▼' ) ]); } return ''; @@ -67,9 +67,9 @@ var DateTimePickerTime = onClickOutside( React.createClass({ renderDayPart: function() { return DOM.div({ key: 'dayPart', className: 'rdtCounter' }, [ - DOM.span({ key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours') }, '▲' ), + DOM.span({ key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ), DOM.div({ key: this.state.daypart, className: 'rdtCount' }, this.state.daypart ), - DOM.span({ key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours') }, '▼' ) + DOM.span({ key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' ) ]); }, @@ -185,6 +185,11 @@ var DateTimePickerTime = onClickOutside( React.createClass({ }; }, + disableContextMenu: function(event) { + event.preventDefault(); + return false; + }, + padValues: { hours: 1, minutes: 2,