How to catch default error when invalid datetime format entered in dateTimeField?. If we catch the error it will be useful to validate for other dependencies like to enable/disable button.
Eg: How to save the default error message in a variable which we found red colored text in the below screenshot?
Discussion posts and replies are publicly visible
You cannot capture the message. If you want, you can create it using a combination of two textFields() that will give you access to its value if want to validate, as in the current scenario, you will not be able to access the value of it, It will only store the value when no validation is triggered.
The order is
Now you either check the value for null or if you really want the value, then replace it with a textField!