Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Uncle Cheese committed Apr 29, 2014
2 parents 8a583ca + 2bcfa70 commit e9d2842
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion javascript/calendar_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
this.firstDay = new Date(this.year, this.month, 1);
this.startingDay = this.firstDay.getDay();
if($.CalendarWidget.settings.startOnMonday) {
if(this.startingDay === 0) this.startingDay=6; else
this.startingDay--;
}
this.monthLength = this.settings.calDaysInMonth[this.month];
Expand Down Expand Up @@ -162,7 +163,8 @@

var cell = 1;
var empties = 0;
var row_count = Math.ceil((this.startingDay+this.monthLength)/7);
var row_count = Math.ceil((this.monthLength+this.startingDay)/7);

for (var i = 0; i < row_count; i++) {
for (var j = 0; j <= 6; j++) {
date = "";
Expand Down

0 comments on commit e9d2842

Please sign in to comment.