Permalink
Browse files

Datepicker: Set drawMonth/Year when selecting a day

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...
1 parent f1e1f8a commit db11a4428684ca1d2427af0be78452404e243f16 @tsibley committed Jun 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.datepicker.js
@@ -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));
},

0 comments on commit db11a44

Please sign in to comment.