How to restrict Date field to a minimum/maximum value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2021 08:38 PM
I need to know if there is a way to restrict user to only select dates from future.
In vanilla HTML date input field, this can be achieved simply by using max and min attributes which only lets user to select dates from a valid range.
I understand I can check which date the user has selected with an onChange client script or UI policy, which can then clear the field and display an error message if the date selected is not in a valid range.
But I don't want users to be able to select any date from the invalid range in the first place to begin with. Is this possible in ServiceNow Date field?
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2021 09:02 PM
Hi Nilesh,
The following links will definitely help you with your use case:
Regards,
Mahesh Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2021 09:15 PM
Hi,
Track the path which is given in below Link and achieve your target:--
No Code date validations through (Catalog) UI Policies
Please Mark correct.
Thanks & Regards,
Vikas Shukla
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2021 12:09 PM
Nilesh, did you ever get an answer to this? I am also trying to keep the user from selecting a date rather than getting an error message after the date is selected. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2023 09:04 AM
Hi,
You can refer to this doc to find out more: https://add-ons.org/how-to-add-restrict-dates-by-elemetor-forms/