| Making dates unselectable ¶ | |
| I am currently attempting to utilize your calendar popup to fill in a online appointment booking form. I have customized the calendar to fit my specific needs sans one request. My appointment dates are ALWAYS full for around 7 days from the current date. I would like to make every date up to and including 7 days past the current date unselectable. Is there a way to do this? I have seen other popup calendars do this somehow but am not sure they are dhtml. Any help with the code would be appreciated. I was thinking I could work around this problem by creating a function that would add 7 days to the current date and display an alert if the user selects a date that is not far enough in advance but I would really like to make them unselectable (simular to weekend days) Thanks again... | |
| Re: Making dates unselectable ¶ | |
| Eric, add the variable and function below to your script: function disallowDatesseven(date) { Be sure to add the following to the end of your Calendar.setup list: disableFunc : disallowDatesseven //the function to call Finally, be sure to add a comma after the previous listing above it or else it won't work in your browser. It should end up looking something like this: Calendar.setup({ | |
| last |
| Re[2]: Making dates unselectable ¶ | |
| That works great, I do have one small problem though, when I add the "disableFunc" function I lose my "dateStatusFunc" function that was disabling my weekends. Is there a way to combine these two or call the secend one from the first? I have attatched my full test code below becase I feel I may not be making myself clear. Thanks <script type="text/javascript" src="calendar-en.js"></script> <!-- the following script defines the Calendar.setup helper function, which makes adding a calendar a matter of 1 or 2 lines of code. --> </head> <script type="text/javascript"> function disallowDatesseven(date) { | |
| last |














