Client script was not working for date validation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 07:34 AM
Hi All,
Actually i have created client script for date validation , but its not working on the form as expected
Please help me on this
Thanks
Ramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 08:00 AM
Hi @Ramu6,
I would suggest to use the UI policies instead of Client scripts for date validations.
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 09:15 AM
Hi @Ramu6,
You may add conditions as:
Deadline end date IS LESS THAN BEFORE Deadline start date
Execute if true:
function onCondition() {
g_form.clearValue("u_deadline_start_date");
g_form.showFieldMsg("u_deadline_start_date", "add error message" , "error");
}
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 👍🏻
Thanks,
Sagar Pagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 08:24 AM
Hi @Ramu6
Best way to achieve this would be using UI policy, as it will require less to no scripting.
First mark Run script as true then,
You can put alert and setting the value as empty in the if true condition script
I have shown how you can achieve it, you can do it the same way for your fields.
Aman Kumar