http://screencast.com/t/mcJ4tM7K8tGK
The client state of the control remembers the selected dates, but once it re-renders after a postback none of the <td> tags have the rcSelected class applied...I have to hover-over the element to get it to show back up.
7 Answers, 1 is accepted
This happens because Firefox caches the values of the <input> elements where RadCalendar keeps its state (selected dates, focused date, etc.). As a work around you can manually clear the selected dates from the calendar, for example on the client-side Load event of the control:
ASPX:
<
telerik:RadCalendar
ID
=
"RadCalendar1"
runat
=
"server"
ClientEvents-OnLoad
=
"clearSelection"
/>
JavaScript:
function
clearSelection(sender, eventArgs) {
var
calendar = sender;
var
dates = calendar.get_selectedDates();
for
(
var
i = 0; i < dates.length; i++) {
var
date = dates[i];
calendar.unselectDate(date);
}
}
And if the dates are actually checked you could loop thought calendar's cells and change their styles. Or use the OnDayRender client event for setting the styles.
Greetings,
Vasil
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.
Can you guys internally just not do this
$telerik.isFirefox then run the code below?
I mean I'd have to remember to do this on literally EVERY radcalendar I use...and that sucks :(
I was able to reproduce the problem when refreshing the page in Firefox using the reload button(or hitting F5), we will do further research on what exactly causes the problem and we will fix it if it is possible.
However, making regular PostBack doesn't trigger such an issue on my side. For example if I add a calendar and a button for making a PostBack and then select some values and click the button. After the page loads selected dates will have selected style applied. Could you show us the code that you used in your demonstration for helping us to reproduce the same issue?
All the best,
Vasil
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.
<
ul
>
<
li
>
<
h6
>Standard</
h6
>
<
telerik:RadCalendar
ID
=
"RadCalendar2"
runat
=
"server"
DbSelectedDate='<%= DateTime.Now %>' />
</
li
>
<
li
>
<
h6
>No Week Row</
h6
>
<
telerik:RadCalendar
ID
=
"RadCalendar3"
runat
=
"server"
ShowRowHeaders
=
"false"
/>
</
li
>
<
li
>
<
h6
>Multi Month</
h6
>
<
telerik:RadCalendar
ID
=
"RadCalendar1"
runat
=
"server"
MultiViewColumns
=
"2"
MultiViewRows
=
"2"
/>
</
li
>
</
ul
>
..and here's my skin
<
telerik:RadCalendar
runat
=
"server"
Skin
=
"Medportal"
EnableEmbeddedSkins
=
"False"
DayNameFormat
=
"Short"
ShowRowHeaders
=
"false"
/>
We still can't replicate the problem in sample page using regular post-back. Check this video and the attached web site. If you are able to reproduce it in this page, please feel free to do some modifications of the code and send it back to us to continue further debugging on our side.
All the best,
Vasil
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.
http://screencast.com/t/CHth8jhl
Shows the calendar selection being gimpy after a refresh, but the RadGrid handles it properly
Thank you the effort to providing us a feedback. As I mentioned before, we are aware that this issue occurs when using F5 or refresh button and our developers are researching if there is any way of solving this problem that happens only in Firefox. I was asking if you observed such an issue when PostBack using a button in the page.
Greetings,
Vasil
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.