We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to customize date picker.

Le Son
Tera Contributor

After when I create field with type is date time.

I want customize this field. I don't want the user to be able to select on Saturdays and Sundays. It will readonly

How to customize date picker?

1 ACCEPTED SOLUTION

Danish Bhairag2
Tera Sage

Hi @Le Son ,

 

I don't think that is doable. But what you can do is , write an onChange script on that field & validate if the date selected is on SAT or SUN. if Yes then you can clear the value from that field & display a field msg as error or an alert stating . Sat & Sun cannot be selected.

 

Thanks,

Danish

 

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@Le Son 

This is not possible.

 

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

Dr Atul G- LNG
Tera Patron

Hi @Le Son 

 

Not sure what is use case for this , but practically it is not doable. You can set some validation on Sat and Sun and show the error / pop up message.

*************************************************************************************************************
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]

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