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

disable telerik raddatepicker

1 Answer 207 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Santosh
Top achievements
Rank 1
Santosh asked on 01 Oct 2013, 11:05 AM
how to disable/enable telerik raddatepicker using javascript ????

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 03 Oct 2013, 03:18 AM
Hi Santosh,

Please have a look into the following JavaScript that I tried to enable/disable RadDatePicker in OnClientClicked event of RadButton.

ASPX:
<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
</telerik:RadDatePicker>
<telerik:RadButton ID="RadButton1" runat="server" Text="Enable/Disable DatePicker"
    AutoPostBack="false" OnClientClicked="OnClientClicked1">
</telerik:RadButton>

JavaScript:
<script type="text/javascript">
    function OnClientClicked1(sender, args) {
        var datepicker = $find("<%=RadDatePicker1.ClientID %>");
        if (datepicker.get_enabled() == false)
            datepicker.set_enabled(true);
        else
            datepicker.set_enabled(false);
    }
</script>

Thanks,
Shinu.
Tags
Calendar
Asked by
Santosh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or