Board Logo

Making WEEKSTART a configurable option
maclir - 9/26/2002 at 08:00 PM

Firstly, thaks for a great tool. We are implementing it on some of our websites here.

One addition that I made was to make the starting day for each week a configurable option, similar to the time component and the year scroll parms. It only requires a few lines of changes to the calendarx.js and calendar.html files.

In calendar.html

Remove the definition:

(in fact, move it to the corresponding place in the calendar2/1.js file)

Change all instances of NUM_WEEKSTART to obj_caller.week_start (there are only two)

In calendar1.js (or calendat2.js):

Add the definition of NUM_WEEKSTART

After the line
this.year_scroll = BUL_YEARSCROLL;
this.week_start = NUM_WEEKSTART;

Then when you whish to use the popup calendar, in the in-line script where you define the calx variable, and assign values to the year_scroll and time_comp properties, add the line:

calx.week_start = 1; (or 0)


susan9 - 10/14/2002 at 02:06 PM

My client's working week starts on a Saturday -- a real headache, I thought. Then I found Tigra, then I read and implemented your suggestions. Fantastic! Now, I've gotta solve the Javascript control error!! Dunno what's causing that...

Back to forum: