Hello Telerik Team,
I have a little problem with highlighting the selected day in the month view. I know there is a kb article which describes how to highlight the selected day in the month view.
My problem is, when I use a handler for the TimeSlotCreated event, like
and the RadScheduler control starts with the month view, the selected date will be displayed correctly (for example with a green background for the Web2.0 skin.
But if I change now to the day view and use the navigation controls in the header to go forward one day and afterwards change back to the month view, at first glance the new selected day will be displayed with the css class above. But if I select now a new day in the month view, then the new day will be displayed with the above css class (which is correct) BUT THE FORMER day which was set to this class after the view change still is displayed with the new css class. So I get two highlighted days, as long as I do not select the former selected day.
As I understand it, if in the month view a day is selected with a single click (inserting of new days only with double clicks), the java script methods of the scheduler control take care of unselecting all days and selecting the new one, i.e. these methods change the css class of the former selected day (tested it with the firefox web debugger). But if the css class of a time slot item is set in the code behind using the handler, this day is not unselected by the java script methods when a new day is selected.
I hope you have some ideas,
Richard.
I have a little problem with highlighting the selected day in the month view. I know there is a kb article which describes how to highlight the selected day in the month view.
My problem is, when I use a handler for the TimeSlotCreated event, like
void
OTRadScheduler_TimeSlotCreated(
object
sender, TimeSlotCreatedEventArgs e)
{
if
(e.TimeSlot.Start.Date == OTRadScheduler.SelectedDate)
{
e.TimeSlot.CssClass =
"rsSelectedSlot"
;
}
else
{
// if the actuale date of the time slot is not the selected date, check if the rsSelectedSlot css class is set, if so delete it
if
(
string
.Compare(e.TimeSlot.CssClass,
"rsSelectedSlot"
) == 0)
{
e.TimeSlot.CssClass =
""
;
}
}
}
and the RadScheduler control starts with the month view, the selected date will be displayed correctly (for example with a green background for the Web2.0 skin.
But if I change now to the day view and use the navigation controls in the header to go forward one day and afterwards change back to the month view, at first glance the new selected day will be displayed with the css class above. But if I select now a new day in the month view, then the new day will be displayed with the above css class (which is correct) BUT THE FORMER day which was set to this class after the view change still is displayed with the new css class. So I get two highlighted days, as long as I do not select the former selected day.
As I understand it, if in the month view a day is selected with a single click (inserting of new days only with double clicks), the java script methods of the scheduler control take care of unselecting all days and selecting the new one, i.e. these methods change the css class of the former selected day (tested it with the firefox web debugger). But if the css class of a time slot item is set in the code behind using the handler, this day is not unselected by the java script methods when a new day is selected.
I hope you have some ideas,
Richard.