This is a migrated thread and some comments may be shown as answers.

Disabling RadDatePicker

1 Answer 178 Views
Input
This is a migrated thread and some comments may be shown as answers.
Hugues
Top achievements
Rank 1
Hugues asked on 02 Apr 2008, 05:38 PM
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
....
        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);
        }
....
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?

Thanks,

Hugues Ferland

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 03 Apr 2008, 08:00 AM
Hi Hugues,

You can download the latest Telerik.Web.UI (we have uploaded "Futures" build a week ago) and use set_enabled(false) of the DatePicker client object to disable it.

Kind regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
Hugues
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or