- 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
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
07-25-2021 02:28 AM
Hi Gaurav
i need the 'leaving date' to be equal or greater than the 'joining date'
do i need to make any changes to the above scripts?
Thanks
Levino

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2021 09:32 PM
Hi Levino
Do you have joining date variable available in your catalog item form?
have you set the joining date value onLoad/onChange as soon as user log in to system.
example... I have open that catalog item, so in joining date field my joining date will appear automatically.
is this configuration is already in your catalog item?
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2021 02:10 AM
Hi Gaurav
yes i have a joining date.
no i have not set the joining date onload
Thanks
Levino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 08:09 AM
If I select today's date in date/time picker i should not be able to decrement minutes hours means I want to disable past time of today. and past dates