Hello
I need to know how I can validate if a date is correct or not, and on failure to do something.
I have a DateTime Field field, with a pattern 'DD / MM / YYYY', the value is correctly displayed using the chosen pattern, the problem is validation.
Now I just want that if the date is wrong, teaches an alert to the user, and the focus returns to the DateTime control until you enter a valid value.
I need something like:
- Form1.SUBVENCION_O_AYUDA.dateTimeField1:: validate - (JavaScript, client) --
if (this.rawValue! = null && !test(this.rawValue, 'DD/MM/YYYY')) {
xfa.host.setFocus("this");
}
How do I know if the validation is successful or not (without having to implement long date handling functions)?
By default, if I set "validation pattern messaga" to field, a warning message is shown, but here the focus is lost and the user can continue filling the rest of the form, while the datetime field is filled with an incorrect value.
I want to prevent the user to continue filling the form if the dateTime field value is invalid.
Any idea?
Thank you!