Bug In RadDateTimePicker _onCellClickHandler event

4 posts, 0 answers
  1. Raheel Ashraf
    Raheel Ashraf avatar
    13 posts
    Member since:
    Mar 2010

    Posted 23 Dec 2010 Link to this post

    I am using ASP.NET AJAX Q1 2010 and I am having some issues with firefox.

    Scenario:
    I adopted the sample at http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-multimonthview-calendar.aspx and used it with RadTimePicker so the idea is that for selecting date, user can use multiple month calendar and then select time. However, on firefox, if first the user selects date and then selects time, the control renders invalid date (red border with invalid image).

    Diagnosis:
    So I traced through the code and the problem is in the click handler for the time view..

    This is telerik code:

    ,_onCellClickHandler:function(k){var c=Telerik.Web.UI.Calendar.Utils.FindTarget(k,this.get_id());
    if(c!=null){var g=c.cellIndex;
    if(navigator.userAgent.match(/Safari/)){var h=c.parentNode;
    var a;
    for(a=0;
    a<h.cells.length;
    a++){if(h.cells[a]==c){g=a;
    }}}var m=this._findTime(c.parentNode.rowIndex,g);
    if(m!=null){this._onCellMouseOutHandler(k);
    var j=this.getTime();
    if(j!=null){m.setDate(j.getDate());
    m.setMonth(j.getMonth());
    m.setYear(j.getYear());
    }var n=new Telerik.Web.UI.TimeViewSelectingEventArgs(m,j);
    var d=this.raise_clientTimeSelecting(n);
    if(!d){this.setTime(m.getHours(),m.getMinutes(),m.getSeconds(),m);
    ......................

    The problem is in the bolded line. The getYear api is depreciated and instead getFullYear should be used. as if the date is Jan 5, 2011, on firefox, getYear returns 111 and when you do m.setYear(111), m's date is something wierd. 
    Now why does this error no manifest in all demos and normal situation is because, in setTime method we have:


    in normal scenario, the if condition would be false and hence d=f.get_selectedDate(); is executed. However, since I am using http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-multimonthview-calendar.aspx, d = g is evaluated. And future down in the code, _setHiddenValue is called which actually verifies that the selected date is between min and max and this is where it fails. 
  2. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 28 Dec 2010 Link to this post

    Hello Raheel,

    I tested the scenario which you describe and I reproduced the unwanted behaviour. Our developers are aware and they will start working on the resolution of this issue.
    Additionally as a small token of gratitude for your involvement I have updated your Telerik points.

    Regards,
    Radoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Raheel Ashraf
    Raheel Ashraf avatar
    13 posts
    Member since:
    Mar 2010

    Posted 04 Jan 2011 Link to this post

    Thanks..Can you please post here and let us know once its fixed..
    thanks
  4. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 14 Jan 2011 Link to this post

    Hello Raheel,

    I am glad to inform you that the described issue has been fixed and you can download latest internal build from your account. On the following links you could find instructions how to use the hotfix dlls and how to upgrade Telerik's RadControls to another version:
    http://www.telerik.com/help/aspnet-ajax/installusinghotfix.html
    http://www.telerik.com/support/kb/aspnet-ajax/general/updating-radcontrols-for-asp-net-to-another-version-or-license.aspx
    I hope this helps.

    Regards,
    Radoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top