Results 1 to 4 of 4

Thread: Start of the Week Jason's Date Input Calendar

  1. #1
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Start of the Week Jason's Date Input Calendar

    1) Script Title:
    Jason's Date Input Calendar

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...oncalendar.htm

    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!

  2. #2
    Join Date
    Jul 2006
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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++) {

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

  3. #3
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for your help!

    It functions perfectly!

  4. #4
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Change first day of week in Jason Date Input Calendar

    STEP 2 in above code is wrong! (to see what I mean go to June 2008 in your calendar.)

    Instead do the following:

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •