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

Highlighting Today's cell no longer working after setting TimezoneoffSet

1 Answer 35 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
JD.
Top achievements
Rank 1
JD. asked on 28 Sep 2011, 06:06 AM
Hi

 

div.RadScheduler_Sitefinity .rsMonthView .rsTodayCell
{
background-color: #CCFF00;
color: #000;
border: 1px solid #000;
}

I have set above in my stylesheet and was working very fine until In the Page_Load event
I added a line as below.

RadScheduler1.TimeZoneOffset =
TimeSpan.Parse(userSettingRow.UserTimeZone);

The TimeZone works fine, but I notice that the stylesheet no longer works and all cell have same background color (White).

-JD

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Oct 2011, 09:50 AM
Hi J.,

You can dynamically set the today's date style like this:
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
    {
        if (e.TimeSlot.Start.Date == DateTime.Now.Date)
        {
            e.TimeSlot.CssClass = "TodayStyle";
        }
    }

<style type="text/css">
        div.RadScheduler_Sitefinity .rsMonthView .TodayStyle
        {
            background-color: #CCFF00;
            color: #000;
            border: 1px solid #000;
        }
    </style>


Regards, Peter
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
Scheduler
Asked by
JD.
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or