Skip to content

Commit

Permalink
A fix for _refreshCalendarGrid method
Browse files Browse the repository at this point in the history
  • Loading branch information
paravena committed Dec 12, 2011
1 parent e56b501 commit dcc0318
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/myui/DatePicker.js
Expand Up @@ -443,6 +443,7 @@ MY.DatePicker = Class.create(MY.TextField, {
var weekCell = null;
if (i % 7 == 0 && showWeek && (month == beginningMonth || i == 0)) {
weekCell = cell.previousSiblings()[0];
weekCell.addClassName('week-number');
weekCell.down().update(beginningDate.getWeek());
} else {
weekCell = cell.previousSiblings()[0];
Expand All @@ -465,6 +466,10 @@ MY.DatePicker = Class.create(MY.TextField, {
cell.removeClassName('weekend');
cell.removeAttribute('id');
div.update(' ');
if (showWeek && i % 7 == 0 && i > 7 * numberOfMonths) {
weekCell = cell.previousSiblings()[0];
weekCell.down().update(' ');
}
}
beginningDate.setDate(day + 1);
}
Expand Down

0 comments on commit dcc0318

Please sign in to comment.