]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Remove unwanted keyboard shortcut
authorFelix Nagel <info@felixnagel.com>
Thu, 5 Jun 2014 18:32:27 +0000 (20:32 +0200)
committerScott González <scott.gonzalez@gmail.com>
Thu, 29 Jan 2015 23:01:28 +0000 (18:01 -0500)
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

index 0e4dde7fb278595800a8c9e83aad157d09cf6366..d03d1b8b2f34d693084d4e7d51eb76e27b612cd0 100644 (file)
@@ -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() {