tags:

views:

47

answers:

0

I need a snippet of javascript that will auto insert future date and time in a form input dropdown list?

I want customers to be able to select from an option of 3 different dates (for appointments)

For example....

Choice 1 should give a drop down list...

Mon 26th Oct 09 Tue 27th Oct 09 Wed 28th Oct 09 Thu 29th Oct 09 Fri 30th Oct 09

Choice 2 should give another drop dow list as above offering the custome an alternative date

Choice 3 as above but with another alternative date.

In all cases the first option date given should be at least two days in advance as we cannot book customers the same (or even next) day. So the 1st date given above of 26th Oct should be as the user is using there computer to book an appointment of the 24th Oct.

The script also needs to avoid weekends if possible (its no essentialbut would be cool) for example....

Mon 26th Oct 09 Tue 27th Oct 09 Wed 28th Oct 09 Thu 29th Oct 09 Fri 30th Oct 09 Mon 2nd Nov 09 Tue 3rd Nov 09 Wed 4th Nov 09 Thu 5th Nov 09 Fri 6th Nov 09

In all cases the drop downs should give a list of 10 days in advance..

Hope somebody can help with this!. Thanks