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 ) {
|
_handleKeydown: function( event ) {
|
||||||
|
var pageAltKey = ( event.altKey || event.ctrlKey && event.shiftKey );
|
||||||
|
|
||||||
switch ( event.keyCode ) {
|
switch ( event.keyCode ) {
|
||||||
case $.ui.keyCode.ENTER:
|
case $.ui.keyCode.ENTER:
|
||||||
this.activeDescendant.mousedown();
|
this.activeDescendant.mousedown();
|
||||||
return;
|
return;
|
||||||
case $.ui.keyCode.PAGE_UP:
|
case $.ui.keyCode.PAGE_UP:
|
||||||
this.date.adjust( event.altKey ? "Y" : "M", -1 );
|
this.date.adjust( pageAltKey ? "Y" : "M", -1 );
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.PAGE_DOWN:
|
case $.ui.keyCode.PAGE_DOWN:
|
||||||
this.date.adjust( event.altKey ? "Y" : "M", 1 );
|
this.date.adjust( pageAltKey ? "Y" : "M", 1 );
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.END:
|
case $.ui.keyCode.END:
|
||||||
this.date.setDay( this.date.daysInMonth() );
|
this.date.setDay( this.date.daysInMonth() );
|
||||||
|
Loading…
Reference in New Issue
Block a user