Date Range with two input fields

Hello,

I am using the following code to initiate the calendar:

[code][/code]

Currently, it is possible to select ANY date.
How can I change the code so that when a user selects a date in cal1 that the date in cal2 CANNOT be before the date in cal1? This is necessary for a arrival date/departure date form (date range).

Any help is appreciated.

Thank you.

Hello,

you can use setSenstive method to control the sensitive range:

calendar1.attachEvent(“onClick”,function(date){
calendar2.setSensitive(date,null);
})

Hello,

Thank you for your reply.

But where exactly do I place this code in my code? I have tried several ways, but none worked.

Could you please advise?

Here is our current code again:

[code][/code]

Thank you.
Pasci