How to disable automatic selection of TODAY in multiple selection of a month.

2 posts, 0 answers
  1. Karl Golling
    Karl Golling avatar
    226 posts
    Member since:
    Jun 2005

    Posted 13 May 2009 Link to this post

    I have a calender usually depicting the current month with multiple selection of dates. How can I disable the automatic selection of TODAY.  If a date on the calendar has not been selected programmatically it should not appear. How do I disable the automatic today selection?

    Thank you
    Karl
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 18 May 2009 Link to this post

    Hello Karl Golling,

    There are 2 possible workarounds here.

    1. You can define a new theme using our VisualStyleBuilder tool and add/remove any of the custom settings about the Today state of CalendarCellElement.
    2. You can subscribe to the ElementRender event of RadCalendar. Here is a sample code which resets the Today state when the cells are rendered:

         this.radCalendar1.ElementRender += new RenderElementEventHandler(radCalendar1_ElementRender);
          

      void radCalendar1_ElementRender(object sender, RenderElementEventArgs e)
            {
                CalendarCellElement cell = e.Element as CalendarCellElement;

                if (cell != null && cell.Today)
                {
                    cell.Today = false;
                }
            }

    I hope this helps you. Please contact me again if you have more questions.

    Best wishes,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top