From ac459ff7df4904cb8601d4efb95107177ecb40e0 Mon Sep 17 00:00:00 2001 From: Kato Kazuyoshi Date: Sat, 7 May 2011 06:32:13 +0900 Subject: [PATCH] Datepicker: Fixed #7043 - Using multiple months always renders 6 rows of dates even if only 5 are needed. --- ui/jquery.ui.datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 12323672a..662b49f86 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1489,7 +1489,7 @@ $.extend(Datepicker.prototype, { if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; - var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate + var numRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows calender += ''; -- 2.39.5