Make date picker read only

Gangadhar Ravi
Giga Sage
Giga Sage

Hi

I used this Readonly Variables on a Standard Form - ServiceNow Guru   to make variables on Task read-only. But still I am able to change the date using the date picker icon. Please help me.

Thanks,

Sai.

3 REPLIES 3

Gangadhar Ravi
Giga Sage
Giga Sage

abhi_r     Please let me know if you have any idea.



Thanks,


Sai.


Hi,



Create a Catalog UI Policy:


Onload: true


Run script: true


Run scripts in UI type: All



Execute if true:




function onCondition() {  


var $ = this.jQuery;  


$('input[id*="field_sys_id"]').attr('readonly', true);  


}  



Regards,
Anup Raheja








Dave Smith1
ServiceNow Employee
ServiceNow Employee

A quick search shows someone asking something similar here: https://community.servicenow.com/thread/290847 - does that help?