]> source.dussan.org Git - jquery-ui.git/commitdiff
Revert "Datepicker: Fixed #7043 - Using multiple months always renders 6 rows of...
authorScott González <scott.gonzalez@gmail.com>
Thu, 12 May 2011 12:18:06 +0000 (08:18 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 12 May 2011 12:18:06 +0000 (08:18 -0400)
This reverts commit 5e1032ec74feba976c91de275605174c87710a6a.

ui/jquery.ui.datepicker.js

index 419e6b84b356763497bb3d25058232ac97fc51f0..996528937ea9fe8dbbd3b2a3d9d92eca661baf1c 100644 (file)
@@ -1490,7 +1490,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 = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
+                               var numRows = (isMultiMonth ? 6 : 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 += '<tr>';