Only past dates on catalog date variable

Yasin Shaik11
Tera Contributor

Hi All,

 

On a catalog date variable i want to allow only past dates not today date or future date. how we can do using the UI polices. 

1 ACCEPTED SOLUTION

Hi @Yasin Shaik11 ,

 

Uncheck the Onload checkbox from UI policy & the script u should write in false condition. After making this changes please check it will work.

 

Thanks,

Danish

 

View solution in original post

12 REPLIES 12

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Here you go:
- 2019-08-12 - Article - No Code date validations thru (Catalog) UI Policies

 

Proven mechanism!

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

@Mark Roethof 

I have gone through your article but unfortunately there is no solution for the variable should only allow past dates. 

Please share what you tried and is not working. Because it is a proven mechanism and has worked for hundreds of others already.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

@Mark Roethof 

 

First i would like to explain my requirement. I have date field on catalog item. the date field should only allow past dates only not future date or present dates for that i have configured the UI police as attached.  and this is working for future dates not allowing me to enter the past date, but my requirement should allow past and should not allow the future date.  
please suggest me what modification are required for this.