[CF10] CFINPUT custom validation start and end dates

Hello, everyone,

Another developer that I am working with is working with a form that has start and end dates. He’d like to be able to use custom JavaScript validation to make sure that not only are the dates in proper format (that part of the JS is working fine), but that it will also check to make sure that the start date will always be prior to (or equal to) the end date, and will throw an alert if the end date is before the start date.

I’ve Googled for this, and am finding informative suggestions on just making sure the date is in the right format, or falls within a certain range, but nothing on how to make sure that one date is before (or less than) another.

I’m guessing that data binding might be a part of it. Can anyone suggest how to set these fields so that each has a validateat=“onblur” that will check both values?

Also, as a related issue, he has the CF datepicker working as far as entering the dates, but since the field doesn’t get/lose focus on this, how do we trigger the function? EDIT: Currently, a function can be triggered IF the user manually enters a date and then blurs the focus.



This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.