aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPiotr Baran <piotros@wp.pl>2016-02-19 22:23:11 +0100
committerScott González <scott.gonzalez@gmail.com>2016-03-30 09:42:38 -0400
commitbf5d6f314b3798094efdca4b73e09233f2a69d7d (patch)
tree5282a19f84d38b01170f5659d3f95919b7debc99 /ui
parent882eb4cbf261985624d4ce0f0a59ca8f38a4b054 (diff)
downloadjquery-ui-bf5d6f314b3798094efdca4b73e09233f2a69d7d.tar.gz
jquery-ui-bf5d6f314b3798094efdca4b73e09233f2a69d7d.zip
Datepicker: Fixed keyboard navigation
Fixes #7956 Closes gh-1677
Diffstat (limited to 'ui')
-rw-r--r--ui/widgets/datepicker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js
index c80c27c48..215ba12ac 100644
--- a/ui/widgets/datepicker.js
+++ b/ui/widgets/datepicker.js
@@ -1913,8 +1913,8 @@ $.extend( Datepicker.prototype, {
/* Adjust one of the date sub-fields. */
_adjustInstDate: function( inst, offset, period ) {
- var year = inst.drawYear + ( period === "Y" ? offset : 0 ),
- month = inst.drawMonth + ( period === "M" ? offset : 0 ),
+ var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
+ month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );