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

RadDatePicker javascript error

6 Answers 190 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 03 Nov 2011, 07:20 PM
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.

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Nov 2011, 05:30 AM
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.
0
Marco
Top achievements
Rank 1
answered on 04 Nov 2011, 06:56 PM
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"/>

0
Dean
Top achievements
Rank 1
answered on 18 Jan 2012, 07:42 PM
Was a solution ever found for this issue?  I am experiencing the same issue now.
0
Marco
Top achievements
Rank 1
answered on 18 Jan 2012, 08:42 PM
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.
0
Dean
Top achievements
Rank 1
answered on 18 Jan 2012, 08:45 PM
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.
0
Nino
Top achievements
Rank 1
answered on 04 Jun 2012, 04:06 PM
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.
Tags
General Discussions
Asked by
Marco
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Marco
Top achievements
Rank 1
Dean
Top achievements
Rank 1
Nino
Top achievements
Rank 1
Share this question
or