RadDatePicker - Need to Clear/Disable DateInput field and CalendarPopUp

4 posts, 0 answers
  1. Christine McDaniel
    Christine  McDaniel avatar
    4 posts
    Member since:
    Nov 2007

    Posted 25 Sep 2009 Link to this post

    I need to clear the DateInput field and CalendarPopUp when I click a radio button.  I have my RadDatePicker set up like this:
     

    <

     

    telerik:RadDatePicker

     

     

    SharedCalendarId="sharedCalendar"

     

     

    id="dpAuditorReportBeginDate"

     

     

    MinDate="1/1/1900"

     

     

    Runat="server"

     

     

    Width="100px"

     

     

    style="vertical-align:middle;"

     

     

    cssClass="inputdata">

     

     

    <DateInput cssClass="inputdata" runat="server"/>

     

     

    </telerik:RadDatePicker> 

    ThisDate needs to happen from Javascript. 
    I am using "RadControls for ASPNET AJAX Q1 2008" version. 
    So far I have tried the .Clear() and .clear() without success like this:
    Have tried other forum responses and either can't find object or get a null error. 
    I have this wrapped in a div and can disable everything in the div but the calendar items.

    function toggle enabled(){

     

        var picker1 = $find("<%= dpAuditorReportBeginDate.ClientID %>");
        picker1.clear()
    }

    Hope you can help!!
    Thanks,
    Chris

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 26 Sep 2009 Link to this post

    Hi Christine,

    Attached to this message is a simple runnable application that demonstrates the desired functionality. Please give it a try and let me know if you have other questions or problems.
    For more info about RadCalendar client-side API , please refer to the following help article:
    Client-Side Basics

    I hope this helps.

    Greetings,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Christine McDaniel
    Christine  McDaniel avatar
    4 posts
    Member since:
    Nov 2007

    Posted 26 Sep 2009 Link to this post

    Thank you!!!
    This is be best reply I have received from a help site. 
    That help link was fantastic also.

    For anyone else having troules with this, the thing I was missing was wrapping the javascript in the Telerik tags like this:

    <

     

    telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

     

     

    <script type="text/javascript">
     

     

    </

     

    script>

     

    </

     

    telerik:RadCodeBlock>

    Chris

     

  5. karthik
    karthik avatar
    1 posts
    Member since:
    Nov 2010

    Posted 18 Apr 2012 Link to this post

    Thanks Pavilina...

    It worked great...
Back to Top