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

Is Date fields future or past date can be grey out?

Sruthi_2511
Tera Contributor
 

Screenshot 2026-03-11 173702.png

I have a requirement to grey out the past dates for a catalog date variable so that users cannot select them. Currently, I have implemented a clearValue approach, but I want to know if it is possible to directly grey out the past dates instead

5 REPLIES 5

GlideFather
Tera Patron

Hi @Sruthi_2511,

 

I don't think there's an option to restrict the selection to future dates only.

 

What you can do is restriction upon change of submisison to inform that a selected date must be in the future and disallow to submit/update...

 

Also, you can add an error message

_____
100 % GlideFather experience and 0 % generative AI

Dr Atul G- LNG
Tera Patron

Not possible. It’s better to add script logic validation to prevent the user from selecting an invalid date, or to show an error if they select a past or future date, as per the requirement.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Tanushree Maiti
Giga Sage

Hi @Sruthi_2511 

 

It is NOT possible with the date field to make it grey.  You can run UI policy or onchange client script on it and do some validation  and show some message (info/error) .

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

DallanF
Tera Contributor

To make outdated or previous date field values appear greyed out in ServiceNow, you can use client-side scripting to dynamically adjust the field's appearance.