Buy Now
Sign in

A step by step tutorial in chronoform 5 validate dates

tiesgr , March 19 2014
I wonder if there is a step by step tutorial of how can I create a validation rule to check the dates. I have two inputdate fields one from date and one to date. What I want is two rules, one to validate if the first field is greater than the second and another one to check if the date is in the past. If yes continue validation if not a pop up message to be appeared for example leaving before arriving next to the wrong date.
I have seen some threads about it but it is very mixed and I can't understand where should I put the code or which field should I use. Is there a tutorial of how can I achieve this? Any suggestions would be appreciated.
Thank you in advance.
I am joining tiesgr in my search for a proper tutorial. I have a very similar problem, why is it that every time dates are involved everything becomes a pain?

Please, any advice would be very welcome.
Informacion para adelgazar pinchando aqui.
Ok let's start from a point. Where should at first implement the code which will validate the dates chosen by the visitors of my website? Do I have to create a new field which will have the code and it will run on load of the page ?If yes what kind of field would it be? Don't forget I am talking about chronoforms v5. Thank you.
Well I have followed guide which has done the work but now I want to limit it a bit further. I want only Saturdays to be allowed. I tried the option weekdays:[6] into the code but it didn't work. Another option is that the user must not be able to use dates in the past. How can this can be implemented?