mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Calendar: Use shift and ctrl key as modifier for page up / down
This commit is contained in:
parent
280cda31d0
commit
f2bbea2cec
@ -123,15 +123,17 @@ return $.widget( "ui.calendar", {
|
||||
},
|
||||
|
||||
_handleKeydown: function( event ) {
|
||||
var pageAltKey = ( event.altKey || event.ctrlKey && event.shiftKey );
|
||||
|
||||
switch ( event.keyCode ) {
|
||||
case $.ui.keyCode.ENTER:
|
||||
this.activeDescendant.mousedown();
|
||||
return;
|
||||
case $.ui.keyCode.PAGE_UP:
|
||||
this.date.adjust( event.altKey ? "Y" : "M", -1 );
|
||||
this.date.adjust( pageAltKey ? "Y" : "M", -1 );
|
||||
break;
|
||||
case $.ui.keyCode.PAGE_DOWN:
|
||||
this.date.adjust( event.altKey ? "Y" : "M", 1 );
|
||||
this.date.adjust( pageAltKey ? "Y" : "M", 1 );
|
||||
break;
|
||||
case $.ui.keyCode.END:
|
||||
this.date.setDay( this.date.daysInMonth() );
|
||||
|
Loading…
Reference in New Issue
Block a user