We have a requirement for 2 scripts for automatically creating and then displaying achievable delivery dates on our web site.
First – we need to automatically show our web site visitors when the next delivery is possible. Normally this is next day , but obviously we have a cut-off time after which next day is not possible , so the answer depends on the time when the customer views the web site. The time should be UK based. We also need to be able to adjust the answer to allow for Easter, Christmas and Public Holidays and any days when we are on holiday.
Second - Data is sent to our shopping cart via an input command in a form. Currently the delivery date is added via a general freeform text field. We need to be able to input and control the date either via drop downs or a calendar so that we only show dates that are in the future, and dates on which deliveries can be made. We also need to be able to exclude Sundays, Christmas, Easter and Public Holidays from appearing as possible delivery dates as well as any ad-hoc dates when we are on holiday