Skip to content

Commit

Permalink
Datepicker: Set drawMonth/Year when selecting a day
Browse files Browse the repository at this point in the history
Otherwise when July 2012 is displayed but, for example, 4 August 2012 is selected (on the same calendar), then 4 July is marked active in _generateHTML (not 4 August).
  • Loading branch information
Thomas Sibley committed Jun 15, 2012
1 parent f1e1f8a commit db11a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,8 +904,8 @@ $.extend(Datepicker.prototype, {
}
var inst = this._getInst(target[0]);
inst.selectedDay = inst.currentDay = $('a', td).html();
inst.selectedMonth = inst.currentMonth = month;
inst.selectedYear = inst.currentYear = year;
inst.drawMonth = inst.selectedMonth = inst.currentMonth = month;
inst.drawYear = inst.selectedYear = inst.currentYear = year;
this._selectDate(id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
},
Expand Down

0 comments on commit db11a44

Please sign in to comment.