Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/web/mage/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,14 @@
firstDay = parseInt(this._get(inst, 'firstDay'), 10);
firstDay = isNaN(firstDay) ? 0 : firstDay;

for (row; row < numMonths[0]; row++) {
for (row = 0; row < numMonths[0]; row++) {
this.maxRows = 4;

for (col; col < numMonths[1]; col++) {
for (col = 0; col < numMonths[1]; col++) {
selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));

calender = '';

if (isMultiMonth) {
calender += '<div class="ui-datepicker-group';

Expand Down Expand Up @@ -271,7 +273,7 @@
thead = showWeek ?
'<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '';

for (dow; dow < 7; dow++) { // days of the week
for (dow = 0; dow < 7; dow++) { // days of the week
day = (dow + firstDay) % 7;
thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ?
' class="ui-datepicker-week-end"' : '') + '>' +
Expand All @@ -289,7 +291,7 @@
this.maxRows = numRows;
printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));

for (dRow; dRow < numRows; dRow++) { // create date picker rows
for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
calender += '<tr>';
tbody = !showWeek ? '' : '<td class="ui-datepicker-week-col">' +
this._get(inst, 'calculateWeek')(printDate) + '</td>';
Expand Down