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

Calendar dates Empty

4 Answers 104 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Puneet
Top achievements
Rank 1
Puneet asked on 10 Mar 2009, 02:52 PM
Hi
I'm using RadCalendar 2.0.1, and unable to clear the dates after post back.
Tried the dollowing link
http://www.telerik.com/community/forums/aspnet/calendar/date-picker-null-problems.aspx


I'm getting the error Clear() is not property or method, and if i use DateInput it shows null.
At present they dont want to update the control to newer version.
Please suggest.. this issue is screwing up.

1. tried: RadAjaxManager1.ResponseScripts.Add(

string.Format("window.{0}.Clear(); ", startDate.ClientID));

 

2.

 

function ClearDate()

 

{window[

'<%= startDate.ClientID %>'].DateInput.Clear();

 

 

//window['<%= startDate.ClientID %>'].clear();

 

}

I dont want to use the button/hyperlink to clear the dates

Regards
Puneet

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 13 Mar 2009, 09:15 AM
Hello Puneet,

It seems that you have not defined the function which will be executed after the ajax request finishes execution properly (using the ResponseScripts collection of RadAjaxManager). It should be invoked as follows:

RadAjaxManager1.ResponseScripts.Add(string.Format("window['{0}'].DateInput.Clear(); ", startDate.ClientID));

(the pluses should be replaced with & symbols if one uses VB.NET language)

Alternatively, you can directly invoke the ClearDate javascript method if you have it declared in the aspx of the page:

RadAjaxManager1.ResponseScripts.Add(string.Format("ClearDate();", startDate.ClientID));

Best regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Puneet
Top achievements
Rank 1
answered on 13 Mar 2009, 03:26 PM

Thanks for the reply
I used ur sent code but still getting error:dateInput is null or not an object.

 

 

<radCln:RadDatePicker ID="startDate" AllowEmpty="true" runat="server" AutoPostBack="true" OnSelectedDateChanged="startDate_SelectedDateChanged"/>

Please let me know if i'm missing.

 

0
Puneet
Top achievements
Rank 1
answered on 17 Mar 2009, 07:12 AM
Please can anybody help for this thread?
0
Sebastian
Telerik team
answered on 17 Mar 2009, 08:20 AM
Hi Puneet,

If you still experience difficulties after using one of the two suggested approaches in my previous post, I suggest you either provide your complete updated implementation in this forum thread (using the 'Format Code Block' dialog at the top right corner of the forum editor) or prepare a stripped working version of your project and send it enclosed to a formal support ticket. Thus I will be able to advice you further.

Best regards,
Sebastian
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
Puneet
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Puneet
Top achievements
Rank 1
Share this question
or