- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2021 09:45 AM
User needs to be restricted when user selects the past time in the date fields in the change form. Need to create BR / client script against The Planned Start and End times along with the Outage Start and End times. The business rule/ Client script should prevent all ITIL users from setting a date and time in the past based on their current system time.
I have created Below script include and client script. It is working on preventing user if he selects previous date. But I want to restrict user to select past time also. Please give me solution.
Script Include:
Client Script:
I have created OnChange Client Script on Planned Start date field as below.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2021 08:26 AM
Hello
Please use my below working Scripts, I have achieved this in my PDI. You only need to replace your variables.
onChange Catalog Client Script:-
1) Client Script for Future Date Validation:-
2) Past Date Validation:-
3) Common Client Callable Script Include:-
4) Script Include Code;-
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2023 04:08 AM
Hello @venkysana ,
Without scripting you can achieve this using a single ui policy
If you want users to be restricted from selected past time/date ( even past minute) , you can use the at or before --> current minute filter as shown in the screen shot , which is available in ui policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2024 11:47 PM
Hello @Kalanidhi Ravi ,
I used same UI policy to check current Date/Time, if i select past date its not showing on the form, but the issue is still the incident got saved in incident table.. i want to restrict the user from submission as well if user enter the past date. i tried with the script section by writing below code but its not working as expected. please help me on this.