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

Custom date in Rad Scheduler

1 Answer 65 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
sakura sakura
Top achievements
Rank 1
sakura sakura asked on 16 May 2010, 09:17 AM
In scheduler timeline view, is it possible that custom date in y coordinate. eg,

                                  03-May-2010               05-May-2010               10-May-2010         11-May-2010
-------------------------------------------------------------------------------------------------------------------------------
Meeting Room 1
-------------------------------------------------------------------------------------------------------------------------------
Meeting Room 2
-------------------------------------------------------------------------------------------------------------------------------
I just want to show, predefined date in y coordinate.

Thanks,




1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 19 May 2010, 01:42 PM
Hello sakura sakura,

As I understand you want to show in the Header with dates only those which have appointments. This cannot be done. 

However you can use the calendar to mark there which days have appointments.To be able to do this - use the PreRender event of the RadScheduler and add the appointments dates in the SpecialDays collection of the calendar.

protected void RadScheduler1_PreRender(object sender, EventArgs e)
    {
        RadCalendar popupCalendar = RadScheduler1.FindControl("SelectedDateCalendar") as RadCalendar;
  
        foreach (Appointment a in RadScheduler1.Appointments)
        {
            RadCalendarDay dayWithAppointment = new RadCalendarDay();
            dayWithAppointment.Date = a.Start;
            dayWithAppointment.ItemStyle.CssClass = "DayWithAppointments";
            popupCalendar.SpecialDays.Add(dayWithAppointment);
             
        }
    }

Here's the code for the DayWithAppointments CssClass:

.DayWithAppointments
        {
            background: green !important;
        }

Find the full code in the attached .zip file.

Hope this helps.

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
sakura sakura
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or