From 63bdc3ef81831d6099d8960109afb34d67bd957f Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 5 Jun 2014 20:32:27 +0200 Subject: [PATCH] Datepicker: Remove unwanted keyboard shortcut Remove shortcut for closing the calendar and erasing the date (CTRL+END). Remove unwanted CTRL+HOME shortcut and support for enter key on input. --- ui/datepicker.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/ui/datepicker.js b/ui/datepicker.js index 0e4dde7fb..d03d1b8b2 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -131,9 +131,6 @@ $.widget( "ui.datepicker", { this.close( event ); } break; - case $.ui.keyCode.ENTER: - this.calendarInstance._handleKeydown( event ); - break; case $.ui.keyCode.DOWN: case $.ui.keyCode.UP: clearTimeout( this.closeTimer ); @@ -142,26 +139,6 @@ $.widget( "ui.datepicker", { this.calendarInstance.grid.focus(); }, 1 ); break; - case $.ui.keyCode.HOME: - if ( event.ctrlKey ) { - this.valueAsDate( new Date() ); - event.preventDefault(); - if ( this.isOpen ) { - this.calendarInstance.refresh(); - } else { - this.open( event ); - } - } - break; - case $.ui.keyCode.END: - if ( event.ctrlKey ) { - this.element.val( "" ); - event.preventDefault(); - if ( this.isOpen ) { - this.close( event ); - } - } - break; } }, keyup: function() { -- 2.39.5