I have a orm built with RSForms Pro in which there is a calendar. The form is about bookings for activities, some of which are not available every weekday. Is there a way of checking the date the clients chooses and display some kind of alert in case the activity he/hse is booking, does not take place in that weekday?
Check dates against weekdays
Collapse
X
-
Tags: None
-
Two functions you might find useful:
-
Sure. Just take the dates (using the functions zorgi suggested) and compare them with the dates when the activity is available. Show an error if it is not.
If you do:
[code=php]$day = date('N', strtotime('2010-03-05'));[/code]
You will get the number associated with today's weekday (6 for Friday). - You could just create a list of weekdays in which the activity is available, fetch the weekday the user selected and compare the two.Comment
Comment