Skip to content

Commit bf5d6f3

Browse files
piotrosscottgonzalez
authored andcommitted
Datepicker: Fixed keyboard navigation
Fixes #7956 Closes jquerygh-1677
1 parent 882eb4c commit bf5d6f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/widgets/datepicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,8 +1913,8 @@ $.extend( Datepicker.prototype, {
19131913

19141914
/* Adjust one of the date sub-fields. */
19151915
_adjustInstDate: function( inst, offset, period ) {
1916-
var year = inst.drawYear + ( period === "Y" ? offset : 0 ),
1917-
month = inst.drawMonth + ( period === "M" ? offset : 0 ),
1916+
var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
1917+
month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
19181918
day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
19191919
date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
19201920

0 commit comments

Comments
 (0)