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

4 posts, 0 answers
  1. Sam
    Sam avatar
    11 posts
    Member since:
    Jan 2010

    Posted 13 Jan 2010 Link to this post

    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?

     

     

     

     

  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 18 Jan 2010 Link to this post

    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.
  3. Sam
    Sam avatar
    11 posts
    Member since:
    Jan 2010

    Posted 19 Jan 2010 Link to this post

    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.
  4. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 20 Jan 2010 Link to this post

    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.
Back to Top