Date field not get disabled


I am trying to disable date field when item is locked, I did something like this:

Method is hooked on form event "OnFormpopulated"

var isItemLocked = thisItem.isLocked();

var transfer_date = getFieldByName("transfer_date");


       transfer_date.getElementsByTagName("input")[0].disabled = true;
       transfer_date.getElementsByTagName("input")[1].disabled = true;
       transfer_date.getElementsByTagName("input")[1].src = "../images/calendar-disabled.svg";


Reference from :

so, when I locked item then date field won't get disabled, and if I unlock it and again lock it then it works fine i.e date field gets disabled.

I debug the code but the behavior is same when Item is locked first time and second time.

I tried this on IE, Chrome and Firefox but the got same results.



Parents Reply Children
No Data