- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:01 AM
In form 2 date/time fields.
1 for Start date & 2 is End date.
start date/time must be today or future.
End date/time cannot be same & past from start date?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 06:52 AM
Hi,
In addition to above, also check below
Simply done Using UI Policy and OnSubmit client script.
1)OnSubmit Client script
Check Start Date is less than End Date
function onSubmit() {
var start_date = g_form.getValue('u_start_date'); //pass here your field backend name
var end_date = g_form.getValue('u_end_date');//pass here your field backend name
if (end_date < start_date) {
alert("Start date is gretter than End Date ");
return false;
}
}
2)UI Policy
i) To check Start date is not past date must be future.
If it is past then clear that value using UI Policy.
ii)In UI Policy Action Clear date
iii) In script Section of Ui Policy
Check the Output in below screenshot
Please mark correct/helpful answer if it help you in any way.
Thanks,
Kunal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:40 AM
Hi Rambabu,
No need to write code, Just try my solution once.
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:41 AM
Hi Rambabu,
No need to write code, Just try my solution once.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:59 AM
yes rambabu,
Instead of writing code and making complex go with the solution proposed by Dhananjay Pawar, i tried it will work.
Regards,
Thousif

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:13 AM
Hi,
1)start date/time must be today or future.
Create new ui policy on table and add condition like
start date on today OR start date after today
in script section add alert message
2)End date/time cannot be same & past from start date?
Create new ui policy on table and add condition like
end date after today
in script section add alert message
Mark correct and helpful based on impact.
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 05:28 AM
Hi,
Simply create two UI policy
1)start date/time must be today or future.
Create new ui policy on table and add condition like
start date before today
in script section add alert message and clear that field
2)End date/time cannot be same & past from start date?
Create new ui policy on table and add condition like
end date before today OR end date on today
in script section add alert message and clear that field
Mark correct and helpful based on impact.
Thanks,
Dhananjay.