]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Fixed keyboard navigation
authorPiotr Baran <piotros@wp.pl>
Fri, 19 Feb 2016 21:23:11 +0000 (22:23 +0100)
committerScott González <scott.gonzalez@gmail.com>
Wed, 30 Mar 2016 13:42:38 +0000 (09:42 -0400)
Fixes #7956
Closes gh-1677

ui/widgets/datepicker.js

index c80c27c48fe00581367923c7c9df9ccb419b4f1a..215ba12acea764f9c3f83c498a1d04709eb87e47 100644 (file)
@@ -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 ) ) );