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

How to set a different background color for other month dates?

3 Answers 77 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 27 Oct 2009, 06:21 AM
Hi,
In Scheduler month view,I want to display the dates from other months  in  a diff color than dates inthe current  month, so that it is easy for the user.
 
For e.g.: Scheduler monthview for September 2009 shows August (30, 31) and October (1, 2, and 3). I wantto set Grey color to August and October dates. How to do this?

p.s. the sameissue in Week view  too.

Any clues/hints would help.
 
Thanks
Sabarish

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Oct 2009, 08:26 AM
Hi Sabarish,

Try the following approach in order to set the style for other month days.

CSS:
 
<style type="text/css"
    .OtherMonth 
    { 
        background-color: Gray  !important; 
    } 
</style> 

C#:
 
protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) 
    if (RadScheduler1.SelectedView == SchedulerViewType.MonthView || RadScheduler1.SelectedView == SchedulerViewType.WeekView) 
    { 
        String month = RadScheduler1.SelectedDate.Month.ToString(); 
        if (e.TimeSlot.Start.Date.Month.ToString() != month) 
        { 
            e.TimeSlot.CssClass = "OtherMonth"
        } 
    } 

-Shinu.
0
durul
Top achievements
Rank 1
answered on 03 Apr 2011, 10:21 AM
how can hide other month appointments and date box ?
0
Veronica
Telerik team
answered on 04 Apr 2011, 10:17 AM
Hello Durul,

Please take a look at this forum post for a solution.

Kind regards,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
durul
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or