Make Past and non available dates invisible/gray-out in Calendar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 11:37 PM
I have a requirement in my project to Create a Cat Item in which I have to create date field which having the dates available only I have to make them visible to end user to select the slot.
And the dates which are available will be based on some condition from backend.
At the end , I have to make slot picked calendar which will have only available slot dates.
Similarly like this below picture, this was taken on 30th July,2015, here we are not able to select past dates and able to select only dates after 3 days from now, so it is showing default date as 2nd Aug,2015.
Can anyone please tell me how to achieve this in ServiceNow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 11:46 PM
I think there is no feature as such currently, but you can put validations like below in a client script
var start = new Date(g_form.getValue('<yourDateField>'));
var today = new Date();
if (start < today)
{
alert('Start date must be in the future.');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 11:47 PM
Hello,
Could you please refer below thread -
Regards,
Akshay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 03:19 AM
Hello Yash,
Did you get chance to look into solution provided by me. Please let me know if you need any help.
Regards,
Akshay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2022 03:40 AM
Hi Akshay,
Sorry,
I didn't got the solution from your thread provided.
Thanks,
Yash.