Forum Discussion
Kate_Marsh
6 years agoIdeator II
Hi Plugg,
The date field is composed of two input fields, the text field and the image field. The getFieldByName("_actual_plan_build") function will return an array with two elements. The code you've shared will enable the text field only, but it's a simple fix to also enable the datepicker field. Right after that line of code, add:
getFieldByName("_actual_plan_bill").getElementsByTagName("input")[1].disabled = false;
You may also need to change the image of the calendar to the non-disabled file, which can be done by adding this line:
getFieldByName("_actual_plan_bill").getElementsByTagName("input")[1].src = "../images/calendar-disabled.svg";
Hope this helps,
Kate
Plugg
6 years agoIdeator I
Kate,
Thanks for your response. However, I still can't get the calendar to work. After adding both lines of code, the calendar is now greyed out. could it be i'm using the disabled.svg?