Skip to content
Browse files

revert 47bff8b (fiddling with rows for datepicker)

  • Loading branch information...
1 parent 7741b03 commit ab78b606498b3a71787d170c5fc9900fd21b4c8e @ghiculescu committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/jquery.ui.datepicker.js
View
5 ui/jquery.ui.datepicker.js
@@ -1557,9 +1557,10 @@ $.extend(Datepicker.prototype, {
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- this.maxRows = Math.max(this.maxRows, curRows); // update maxRows, for the largest number of rows (biggest month)
+ var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
+ this.maxRows = numRows;
var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (var dRow = 0; dRow < curRows; dRow++) { // create date picker rows
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
calender += '<tr>';
var tbody = '';
if (showWeek) { // if the displayed starts and ends in different iso8601 weeks, show both. #8420

0 comments on commit ab78b60

Please sign in to comment.
Something went wrong with that request. Please try again.