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
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
Tera Patron

@Le Son 

This is not possible.

 

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

Dr Atul G- LNG
Tera Patron
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.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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/atul_grover_lng [ Connect for 1-1 Session]

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