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

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

1 Answer 110 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 13 May 2009, 10:50 PM
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

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 18 May 2009, 12:37 PM
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Karl
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or