I have a customized compound control that I need to deactivate. This control includes a text field and a calendar component. I want to disable both the image and the text field. Here is how it is identified on the page.
The control's name is "datepicker"
<control:DatePicker ID="dpDOB" runat="server" Title="Date of Birth" TextBoxCssClass="calendartxtS0" TitlePosition="Left" TitleBold="true" />
To disable it, I can use the following code:
document.getElementById("ctl00_ContentPlaceHolder___Page_EventOrganiserSearch_dpDOB_imgBtn").disabled = true;