- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2021 03:28 AM
How to restrict saturday and sunday using UI Policy when selecting the date field?(Only Business days should be selected)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2021 06:02 AM
I think you should mark this response as correct as that contains the script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2021 03:38 AM
Hi,
you can use onChange client script on that date field and check whether the selected date is saturday or sunday
or you can use onChange with GlideAjax
refer below link
Select Weekdays in the date field
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2021 03:45 AM
Hi Ankur
My task is like if we select start date,we cant select end date field more than after 3 days. it will throw an Error.
I achieved it through ui policy.
But if i selected start date as friday it should exclude the count for saturday and sunday.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2021 03:52 AM
Hi,
then in Ajax do this
1) add 3 business days to start
2) check if this date is same as end date
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2021 03:56 AM
Hi
Please,Could you provide some brief explanation