I have one index.html page and on this page I have three controls;
- one is for
source - second for destination
- third is for date/time.
Now I have source-destination like A-B then in calender control there is only certain day of certain month is only available .
For example if London-France is only available on only Monday from April to December means in calender only Monday is enable and all other date are disable.
I have lots of this types of source and destination and for all those source and destination this date and day is different ..
How can I do this using JavaScript?
The general process would be to create an function to update the calendar picker you use. The function would check the current value of the source and destination and lookup the available dates. You can create an array of objects each object having a source, destination, valid and daterange variables. Create one object for each possible combinations. Loop through the object and update the calendar picker based on the valid dateranges.
Once the function is done hook it up to the
changeevent for both the source and destination picker (I assume aselectcontrol, but if not, hook it into whatever control you use).