diff options
author | Felix Nagel <info@felixnagel.com> | 2016-04-13 22:19:01 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2016-09-28 18:28:33 +0200 |
commit | f2bbea2cec809e0b35105c99bf3e14192e9ba88c (patch) | |
tree | 167140ff364832bf6d02298edc735e3c2a67637a /ui/widgets/calendar.js | |
parent | 280cda31d053cea55a6aa3547d88ce9994bff286 (diff) | |
download | jquery-ui-f2bbea2cec809e0b35105c99bf3e14192e9ba88c.tar.gz jquery-ui-f2bbea2cec809e0b35105c99bf3e14192e9ba88c.zip |
Calendar: Use shift and ctrl key as modifier for page up / down
Diffstat (limited to 'ui/widgets/calendar.js')
-rw-r--r-- | ui/widgets/calendar.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/widgets/calendar.js b/ui/widgets/calendar.js index 2a4d084c3..767f285e9 100644 --- a/ui/widgets/calendar.js +++ b/ui/widgets/calendar.js @@ -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() ); |