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

RadDatePicker - Need to Clear/Disable DateInput field and CalendarPopUp

3 Answers 133 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Christine McDaniel
Top achievements
Rank 1
Christine McDaniel asked on 25 Sep 2009, 08:50 PM
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

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Sep 2009, 10:28 AM
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.
0
Christine McDaniel
Top achievements
Rank 1
answered on 26 Sep 2009, 04:38 PM
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

 

0
karthik
Top achievements
Rank 1
answered on 18 Apr 2012, 01:21 PM
Thanks Pavilina...

It worked great...
Tags
Calendar
Asked by
Christine McDaniel
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Christine McDaniel
Top achievements
Rank 1
karthik
Top achievements
Rank 1
Share this question
or