RadDatePicker javascript error

7 posts, 0 answers
  1. Marco
    Marco avatar
    3 posts
    Member since:
    Nov 2011

    Posted 03 Nov 2011 Link to this post

    I'm getting a javascript error when a RadDatePicker uses a shared calendar AND is set to autopostback.  It only happens the second time a date is selected and only if the month is changed using the arrows or the month picker.  We're using version 2011.1.519.40.

    Steps to reproduce:
    1. DatePicker with shared calendar and autopostback = true
    2. Click the calendar button and choose a date in the default month.
    3. Click the calendar button again, click the right arrow to change to the next month, and then select a new date from that month.

    The error I'm getting in the Firefox Error Console is "b is null."  Clicking the link in the error console to Telerik.Web.UI.WebResource.axd shows a highlight on "},_setStyleToRenderedDate:function(b,c){b.IsSelected=c;"  

    I can work around this by not using a shared calendar but do you have any ideas?  I recreated the issue in the sample VS2010 website but I can't attach a zip file here.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Nov 2011 Link to this post

    Hello Marco,

    I am not sure which version of the Telerik controls that you are using. IE 9, FireFox 4 and Google Chrome10 are supported by controls starting Q1 2011. If you would like to ensure that our AJAX controls are compatible with the new major versions of these three browsers, you will need to migrate at least to version 2011.1.315. With older versions these browsers are only partially supported.
    Updating RadControls for ASP.NET AJAX to another version or license

    Thanks,
    Princy.
  3. Marco
    Marco avatar
    3 posts
    Member since:
    Nov 2011

    Posted 04 Nov 2011 Link to this post

    As stated above, we're using version 2011.1.519.40.  The error happens in IE8 as well and that's where it was discovered.  I was just using Firefox for the debugging tools.

    Since I can't attach my sample project, the markup for the controls is below.
    <telerik:RadDatePicker ID="RadDatePicker1" AutoPostBack="true" runat="server" Culture="English (United States)" SharedCalendarID="sessionCalendar">
        <DateInput AutoPostBack="True">
        </DateInput>
        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
            ShowRowHeaders="False">
        </Calendar>
        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
    </telerik:RadDatePicker>
     
    <telerik:RadCalendar ID="sessionCalendar" UseRowHeadersAsSelectors="false" UseColumnHeadersAsSelectors="false" ShowRowHeaders="false" runat="server"/>

  4. Dean
    Dean avatar
    17 posts
    Member since:
    Jan 2008

    Posted 18 Jan 2012 Link to this post

    Was a solution ever found for this issue?  I am experiencing the same issue now.
  5. Marco
    Marco avatar
    3 posts
    Member since:
    Nov 2011

    Posted 18 Jan 2012 Link to this post

    Nope.  The only way I was able to get it working was to change the one place I had this combination of settings so that it no longer uses a shared calendar.
  6. Dean
    Dean avatar
    17 posts
    Member since:
    Jan 2008

    Posted 18 Jan 2012 Link to this post

    I narrowed my issue down to having AllowPostBack="true".  I changed that to false and the stopped occuring.  I had to move some code-behind to the client-side since it was no posting back on change, but I got it to work.
  7. Nino
    Nino avatar
    1 posts
    Member since:
    Sep 2011

    Posted 04 Jun 2012 Link to this post

    Hi, I am using Telerik.2011.Q3.SP1 (2011.3.1305.40) for ajax.

    I was having the exact same problem with the RadDatePicker and the Autopostback=true property. Also had a shared calendar referenced from my RadDatePicker.

    Since i really needed the RadDatePicker to do the autopostback, i found another workaround, which is, replace the SharedCalendar for a <Calendar [define properties here]></Calendar> tag inside the RadDatePicker itself.
    This way, when changing the month and making an autopostback, i didn't get the _setStyleToRenderedDate:function(b,c) error anymore.

    This is in case anyone needs to use an autopostback and can't replace the codebehind for javascript.

    Also wanted to say that some Telerik person could take this issue more seriously than saying that we aren't using up to date versions, and not posting any other answer anymore.

    Regards,
    Nino.
Back to Top