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.
This commit is contained in:
Felix Nagel 2014-06-05 20:32:27 +02:00 committed by Scott González
parent 57736406f1
commit 63bdc3ef81

View 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() {