Re: combining functions
2005/03/19 01:49
Viewed 15320 times
Replies: 1/2

I see that I forgot to mention that my weekend days are Sunday and Wednesday, not just Wednesday as suggested in my non working code :)

Re[2]: combining functions
2005/03/19 17:59
Viewed 17548 times
Replies: 1/1

Hi Eric,

You can indeed merge the two functions into one and call it from dateStatusFunc in the Calendar.setup:

var SEVENDAY = 3600*24*1000*7;

function disallowDate(date) {
var now = new Date().getTime();
if ( (date.getTime() < (now + SEVENDAY)) || (date.getDay() == 0) || (date.getDay() == 3) ) {
return true;
}
return false; // enable other dates
}

Then just call the function from the Calendar.setup:

Calendar.setup({
inputField : "dateselect", // id of the input field
ifFormat : "%B %e, %Y", // format of the input field
dateStatusFunc : disallowDate
});

Hope this helps.

Ady

last
Re[3]: combining functions
2005/03/19 18:39
Viewed 19736 times
Replies: 0/0

Yes it sure does help, it solves my problem completely and sure looks simple when you do it :) I guess that is why you make the big $...

Thanks to all...

last
Google