Support Article
Using JS to validate dates where the dates are read incorrectly
SA-73720
Summary
Modal popup is configured with Ok and Cancel buttons, and Required and Validate rules on the Date fields. When the Validate rule is not satisfied, the modal popup closes on clicking the Ok button.
Error Messages
Not Applicable
Steps to Reproduce
Configure a modal dialog with Date fields, and with Ok and Cancel buttons.
Root Cause
Instead of customizing the JavaScript code for validation of the Date fields with an alert message, the Edit Validate rule was configured for the Date field and the submission of the modal dialog was disabled when a Edit Validate message was present.
Resolution
Perform the following local-change:
- Provide a property level Validation rule for the Date fields in the modal dialog.
- Set the Visibility When condition to the Ok button by fetching the Validation message from the Clipboard.
- Disable the Ok button if there is any Validation error message in the modal dialog.
Published March 21, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.