Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

I have a requirement for the cat item . where i have a date/time field .

pavankumars3585
Tera Contributor

I want to allow users only to select the date .today+3 . 

 
 
 

 

7 REPLIES 7

Tanushree Maiti
Giga Sage

Hi @pavankumars3585 

You can follow 2 approched

1. Catalog UI policy

or 

2. Catalog OnChange Client script

 

Catalog UI policy:

 

Screenshot 2026-02-23 084737.jpg

 

Screenshot 2026-02-23 084800.jpg

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@pavankumars3585 

so where are you stuck?

what did you try so far?

You can easily achieve this using UI policy

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

yashkamde
Kilo Sage

Hello @pavankumars3585 ,

 

You can achieve this by onChange client script :

var gdt = new GlideDateTime();
gdt.addDays(3);
var targetDate = gdt.getDate();

if (g_form.getValue('date_field') != targetDate) {
    g_form.showFieldMsg('date_field', 'You can only select ' + targetDate, 'error');
}

 

Also, I have done similar type of requirement where I set the due date field in cat item 3 days after, so you can refer to that also :

https://www.servicenow.com/community/servicenow-studio-forum/regarding-population-of-due-date/m-p/34... 

If my response helped mark as helpful and accept the solution.