- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:15 AM
In my form I have a date field
when the user filled the date field
I need to compare with the current date in client scripts
filled date should be greater than current date
can anyone help please.....?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:20 AM - edited 08-02-2023 02:30 AM
Hi @Phani Pasupulet,
I would suggest to use UI policy instead of Client scripts.
Conditions:
Date_field AT OR BEFORE Today
Execute of true:
function onCondition() {
g_form.clearValue("date_field");
g_form.showFieldMsg("date_field", "Date should be greater than today" , "error");
}
Execute of false:
function onCondition() {
g_form.hideFieldMsg("date_field");
}
// added date_field in hidefieldMsg() fucntion
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:21 AM - edited 08-02-2023 02:22 AM
You can use a simple ui policy to do so
Instead of current minute you can also use today id that works better for you.
Then you can use the script or ui policy action to add alert or change fields as needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:21 AM - edited 08-02-2023 02:22 AM
You can use a simple ui policy to do so
Instead of current minute you can also use today id that works better for you.
Then you can use the script or ui policy action to add alert or change fields as needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 06:58 AM
Thanks a lot Sir