Style Issue after changing FocusedDate from code behind

4 posts, 0 answers
  1. Wesley
    Wesley avatar
    1 posts
    Member since:
    Jun 2012

    Posted 29 Mar 2012 Link to this post

    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;
    }
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 04 Apr 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 04 Apr 2012 Link to this post

    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.
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 04 Apr 2012 Link to this post

    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.
Back to Top