View Full Version : Start of the Week Jason's Date Input Calendar

09-20-2006, 01:49 PM
1) Script Title:
Jason's Date Input Calendar

2) Script URL (on DD):

3) Describe problem:

Hi all,
I want to integrate Jason's Date Input Calendar in mine website but i have a problem: the week starts with Sunday but i need to start it from Monday… this is because in Italy the first day of the week is considered Monday…

I have changed the value in the array but (obviously) it’s not enough… what else do i have to change to let the script functions even with Monday as the first day of the week?

Any help is greatly appreciated!!!

Thx in advance!

09-20-2006, 10:44 PM
You need to make two changes:

1. Move the first 'S' to the end of the list to make the heading starts with (M)onday

var WeekDays = new Array('M','T','W','T','F','S','S');

2. Change the for loop in BuildCalendarDays function from
for (var i=1;i<=7;i++) {

for (var i=2;i<=8;i++) {

09-21-2006, 01:40 PM
Thank you very much for your help!

It functions perfectly!

02-13-2008, 06:13 PM
STEP 2 in above code is wrong! :mad: (to see what I mean go to June 2008 in your calendar.)

Instead do the following:

var FirstDate = new Date(ParentObject.yearValue, ParentObject.monthIndex, 1); in .js file and change 1 to 0