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

Style Issue after changing FocusedDate from code behind

3 Answers 76 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Wesley
Top achievements
Rank 1
Wesley asked on 29 Mar 2012, 03:19 PM
I am trying to change the calendar focus month from the code behind when the selected date is not in the current focus month view.  The month changes as expected with the below code but the style of the individual days in the now focused month view still display with the style "OtherMonthDayStyle".  The style of the individual days is updated when the mouse hovers over each day.

Is there a solution for updating the styles immediately?  I have confirmed the same issue in the following broswers:
IE 8.0.6; FF 11.0; Chrome 17.0.X

 

<Telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
          
<Telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" ShowRowHeaders="false" 
EnableMultiSelect="false" OnSelectionChanged="RadCalendar1_SelectionChanged"
</Telerik:RadCalendar>

protected void RadCalendar1_SelectionChanged(object sender, SelectedDatesEventArgs e)
{
   RadCalendar cal = (RadCalendar)sender;
  
   if (cal.SelectedDate.Month != cal.FocusedDate.Month)
      cal.FocusedDate = cal.SelectedDate;
}

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 04 Apr 2012, 01:52 PM
Hello Wesley,

I used the provided code and prepared a sample test project based on it. However, I was not able to observe the described behaviour. Can you please examine it and let me know what exactly is happening on your side and what we should change in order to replicate the style issue you are facing?

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Pavlina
Telerik team
answered on 04 Apr 2012, 01:52 PM
Hello Wesley,

I used the provided code and prepared a sample test project based on it. However, I was not able to observe the described behaviour. Can you please examine it and let me know what exactly is happening on your side and what we should change in order to replicate the style issue you are facing?

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Pavlina
Telerik team
answered on 04 Apr 2012, 01:56 PM
Hello Wesley,

It seems that there is a problem with the attachment, therefore I am attaching the project again.

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Calendar
Asked by
Wesley
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or