I need a WebDatePicker control to be disabled when a check box is not selected. I have the following JavaScript that is called when the check box is selection is changed:
function enableDisable(bEnable, controlID1) { if (document.getElementById(controlID1) != null) { document.getElementById(controlID1).disabled = !bEnable } }
This does enable and disable the control somewhat. The user cannot click and get the pop-up calendar, but they are still able to type in the text portion of the control. Is there a way to prevent this when it is disabled?
Thanks,
Jeff
Hello Jeff,
Thank you for contacting Infragistics!
The WebDatePicker does not have a disabled property. If you want to disable it you have to set the enabled property to false. You can do so using the helper methods in the following link:
http://help.infragistics.com/doc/ASPNET/2016.1/CLR4.0/?page=WebTextEditor~Infragistics.Web.UI.WebTextEditor~enabled.html
For example:
var wdp1 = $find("<%= WebDatePicker1.ClientID %>");wdp1. set_enabled(false);
Please let me know if you have any further questions concerning this matter.