How to allow user to select only the weekdays from the Date/Time field?

shubham49
Tera Contributor

I have one requirement where I want user to select only Monday - Friday, if they select sat/Sunday. It should give a alert & blank the field. 

1 ACCEPTED SOLUTION

eumak
Tera Guru

Hello Shubham,

This can be done in 1-2ways, you can find the different solutions in the below discussion link-

https://community.servicenow.com/community?id=community_question&sys_id=fa5fc4fb1b350110c465ece6b04b...

 

Mark it as helpful & Correct, If applicable 

Cheers..!
Happy learning 🙂
Tushar

Mark it as helpful or correct, If Applicable


Cheers..!

Happy Learning:)

Tushar

View solution in original post

5 REPLIES 5

eumak
Tera Guru

Hello Shubham,

This can be done in 1-2ways, you can find the different solutions in the below discussion link-

https://community.servicenow.com/community?id=community_question&sys_id=fa5fc4fb1b350110c465ece6b04b...

 

Mark it as helpful & Correct, If applicable 

Cheers..!
Happy learning 🙂
Tushar

Mark it as helpful or correct, If Applicable


Cheers..!

Happy Learning:)

Tushar

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

No need of client script and GlideAjax for this

You can use UI policy for this

Something like this

find_real_file.png

find_real_file.png

Regards
Ankur

 

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

@shubham 

Did you get a chance to check on my above response?

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

I tried this solution to restrict the clients to only select only friday in the entire week as an option but it is not working. Screenshot 2025-01-16 at 3.33.01 PM.pngScreenshot 2025-01-16 at 3.33.28 PM.png