disable telerik raddatepicker

2 posts, 1 answers
  1. Santosh
    Santosh avatar
    24 posts
    Member since:
    Sep 2013

    Posted 01 Oct 2013 Link to this post

    how to disable/enable telerik raddatepicker using javascript ????
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Oct 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top