Select Date Issue in Web Form Builder...

User 3004957 Photo


Registered User
846 posts

Hi All,

I have a client using Web Form Builder who takes tour bookings. They have requested I change the form to ensure people cannot book a tour less than 12 hours before it is due to start.
I just found out that I can also book tours on dates that have already passed, example; I just successfully booked a tour 2 weeks ago on 6th January 2015!

Question 1 - How can I prevent people from booking tours on dates that have already passed?

I had assumed I could merely adjust the GMT of the form to prevent people from booking tours less than 12 hours before they are due to start, however, the support team have informed this can only be done once the 'past date' issue has been solved.

Question 2 - Do any of you more experienced guys know how I do this?

If you know the solution it would be great if you could point me in the right direction or show an example that has already been successfully done..
User 187934 Photo


Senior Advisor
20,181 posts

Hi Mickeyjoe,
Something like this?
http://ericrohloff.com/coffeecup/ccforu … rweekends/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 3004957 Photo


Registered User
846 posts

Hi Eric,
That looks like it should do the trick

I will try to implement it this coming weekend and let you know how I get on.

Thanks for the feedback :)
User 3004957 Photo


Registered User
846 posts

Hi Eric,
I tried adding the code you suggested but unfortunately it did not work.
However, after studying your suggestion it inspired me to actually open up and look into the javascript files supplied with formbuilder.

There is one file called jquery.ui.datepicker

On line 89 & 90 there is a 'mindate' & 'maxdate' field with default setting of 'null' for both.

I looked at the datepicker docs on the jquery.ui website and found that this can easily be altered with the suggestion of '0' if you do not want any historical dates available for booking.

However 0 includes today also so, I changed the original value from null to +1 and now the earliest date anyone can make a booking is always tomorrow.

Thanks for your input it is as always very helpful :)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.