Board Logo

Date Restictions for reservation calendar
arco - 7/12/2008 at 01:37 AM

Hi,

I have a working reservation calendar system as per the demo for the Calendar Pro Date Range Selection Demo but I am unable to restrict the clickable days using the CAL_INIT examples in the documentation eg:

/*
The initial structure demonstrate how to set alowed date.
Only 05 Aug 2004 and 06 Aug 2004 is allowed.
*/
var CAL_INIT1 = {
'formname': 'test_form',
'allowed': {
'date' : ['05-Aug-2004','06-Aug-2004']
},
'dataformat': 'd-M-Y'


};

This dosent have any affect on my calendar. Any suggestions?


ScotDiddle - 7/15/2008 at 10:46 AM

Arco,

Your code worked for me via cut-n-paste.

I did have to add the new calendar(*) statement, however.

Code:

<script language="JavaScript">
/*
The initial structure demonstrate how to set alowed date.
Only 05 Aug 2004 and 06 Aug 2004 is allowed.
*/
var CAL_INIT1 = {
'formname': 'test_form',
'allowed': {
'date' : ['05-Aug-2004','06-Aug-2004']
},
'dataformat': 'd-M-Y'


};
// First Cal
new calendar(CAL_INIT1, CAL_TPL1);


</script>


Is your problem with restricting date range on a second, subsequent calendar, or with the one shown in your post ?

Scot L. Diddle, Richmomd VA


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/