Week starting on monday

First of all, there is a lot of differences between the version on the SVN and the one on the Demopage. This confused me a lot when I was trying to figure out this bug.

I couldn't get my calendar to use monday as startingday of the week correctly. Sure enough the header seemed ok, but when I compared the calendar with a real calendar (like the one in Windows) I noticed the starting day was wrong in SCAL. I think I fixed this now, but I leave that for the experts to evaluate.

I changed this line in _buildWrapper

firstDay = (this.options.weekdaystart - firstDay) < firstDate ? firstDay + this.options.weekdaystart : (firstDay + 7) - this.options.weekdaystart;

with

firstDay = (this.options.weekdaystart - firstDay) < firstDay ? firstDay - this.options.weekdaystart : firstDay;

Now, the dates are correctly placed on the right days according to my real calendar.

Please verify this fix!

Thanks for submitting this

jamiegrove's picture

Thanks for submitting this fix!

You are correct in noting that the HEAD of SVN is different from the version on the site. The HEAD is actually the next release of scal. The current release is the version available on the site and within the branches sub of SVN.

We're a little behind in merging the two at the moment. Sorry for the confusion.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options