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

RadDatePicker client side when disable and re enable the calendar generate error

3 Answers 97 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 13 Jan 2010, 08:43 PM

Hello
I am using RadDatePicker  in my aspx page  

 

<table style="width:100%;">   
<tr> <td>   
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">   
<Scripts>   
<asp:ScriptReference Path="~/App_Javascript/DatePickerClient.js" />   
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />   
 
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />   
   
</Scripts>   
   
</telerik:RadScriptManager>   
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">    
 
</telerik:RadAjaxManager>   
</td> </tr> <tr> <td>   
<asp:RadioButtonList ID="Rbl" runat="server" RepeatDirection="Horizontal">   
<asp:ListItem Value="Y">Yes</asp:ListItem>   
<asp:ListItem Value="N">No</asp:ListItem>   
</asp:RadioButtonList>    
</td> </tr>    
<tr> <td>   
<telerik:RadDatePicker ID="RadDatePicker1" Runat="server">   
</telerik:RadDatePicker>   
</td> </tr>   
</table> 

DatePickerClient.js contain a function

 

function EnableDisable() {   
var rblIsGranted = document.getElementById(arguments[1]);   
var opts = rblIsGranted.getElementsByTagName("input");   
var StartDatePicker = $find(arguments[0]);   
if (opts[0].checked) {   
StartDatePicker.set_enabled(true);   
}  
else {    
StartDatePicker.set_enabled(false);   
}  
}  
 
 
 

 

and in code behind I hoodedup the onclick event to radiobuttonlist

Rbl.Attributes.Add(
"onclick", "EnableDisable('"+RadDatePicker1.ID+"','"+Rbl.ID+"')");

 

 

I can disable and enable the radDatePicker1 by seleting the radiobuttonlist either yes or no but the calendar is generating error on click once I disable the radDatePicker control the errorgenerated in buildin telerik javascript

 

if(h==Telerik.Web.UI.Calendar.Utils.RENDERINROWS)
{
for(var a=l;

a<f.rows.length; //error f is null

a++)

 


any solution please I am missing somthing in the setting?

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 18 Jan 2010, 01:50 PM
Hi Sam,

Cannot seem to reproduce any issues. Attaching a sample page you can test locally. Please let me know what you find.

All the best,
Veli
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
Sam
Top achievements
Rank 1
answered on 19 Jan 2010, 03:17 PM
I am using this viersion 2009.3.1103.35 of telerik
It works fine if you don't select a date from popup calendar and once you select a date  and try to disable the raddatepicker it generates the error described above.
0
Veli
Telerik team
answered on 20 Jan 2010, 06:59 AM
Hello Sam,

Thank you for the reproduction steps.  This issue has been fixed as of version 2009.SP1 (2009.1208) and you can update to this or the latest release to benefit from the fix.

Sincerely yours,
Veli
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.
Tags
Calendar
Asked by
Sam
Top achievements
Rank 1
Answers by
Veli
Telerik team
Sam
Top achievements
Rank 1
Share this question
or