Check for valid date on submit.

Check for valid date on submit.


I have a form with date fields. On submit I need to check to see if the field is a valid date, and throw a message if it is not valid. The field also has a calendar widget. but they need the ability to take out date and the calendar widget will not allow them to do so, once a value is picked and saved. In other words when they go back to edit their form and they put the date in a wrong category they cant remove the date. If I put the field where they can type whatever they want, a lot of times they are putting an invalid date. Not sure if the text box properties will do a check for valid date. Maybe 'onkeyup' properties for the textbox,just not sure what to put or if that is even right.

Hi Reuben,

This might happen if you are using a touch screen device, is that the case?


No, this is a standard web application for our corporate users. I am sure the mobile app will do the same though. I am going to try using  the 'lost focus' function and call an action that checks for a valid date. I will post how that goes.