pauladaniel / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

setting Date.first_day_of_week results in some months' calendars not showing the 1st day of the month #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set Date.first_day_of_week to 6 (Saturday) in calendar_data_select.js
2. Open the calendar for October 2008. 

What is the expected output? What do you see instead?

The first week begins on Oct. 4th, rather than going back to Sept. 27. 

This is using 1.10.11 (I think this is supposed to be 1.11 but the version
at the top of the js file says 1.10.100).

To fix this, I modified the pre_days calculation. Old version:

if (pre_days < 3) pre_days += 7;

New version:

if (pre_days < 3 + Date.first_day_of_week) pre_days += 7;

Original issue reported on code.google.com by kapil.ch...@gmail.com on 10 Oct 2008 at 3:08