On the click event of a checkbox, we want to disable a RadDatePicker. As per the help (ms-help://MS.VSCC.v80/MS.VSIPCC.v80/telerik.radcontrols.prometheus.2007.Q3/telerik.radcontrols.prometheus.2007.Q3/cldClientSideAPI.html) we act on the dateInput and the popupButton.
But when the RadDatePicker is disabled, when there is a postback, an exception is thrown during the client side "dispose" of the component.
This is the part of the code used to enable/disable the RadDatePicker
Thanks,
Hugues Ferland
But when the RadDatePicker is disabled, when there is a postback, an exception is thrown during the client side "dispose" of the component.
This is the part of the code used to enable/disable the RadDatePicker
....Is there another way to completly disable the RadDatePicker? Or is there a way to prevent the exception to be thrown when no handler is installed on the popupButton?
var datePickerInput= control.get_dateInput();
if ( enableFlag && !datePickerInput.get_enabled())
{
datePickerInput.enable();
$addHandler( control.get_popupButton(), "click", control._onPopupButtonClickDelegate);
}
else if ( !enableFlag && datePickerInput.get_enabled())
{
datePickerInput.disable();
$removeHandler( control.get_popupButton(), "click", control._onPopupButtonClickDelegate);
}
....
Thanks,
Hugues Ferland