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

Rad Scheduler Month View Appointment Template

1 Answer 28 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alfred
Top achievements
Rank 1
Alfred asked on 22 Oct 2018, 11:51 AM

I am using the 2015 Q3 version.

It is for mobile rendering.

May I know how to accomplish this:

In Month View, currently the appointments are displayed in a small color box.  Thus, if we have 10 appointments for a day, there are 10 boxes.

I want to display a '10' in the day cell.

It seems that the appointment template does not functioning in mobile month view.

 

Thanks

Alfred

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 24 Oct 2018, 11:47 AM
Hello Alfred,

The appointment template is not rendered in the Month view in Mobile render mode. Nevertheless, you can use the OnTimeSlotCreated event to customize the timeslot: 

protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
{
    var scheduler = sender as RadScheduler;
    if (scheduler.SelectedView == SchedulerViewType.MonthView)
    {
        if (scheduler.ResolvedRenderMode == RenderMode.Mobile)
        {
            e.TimeSlot.CssClass += " mobile-timeslot";
        }
        var aptsPerSlot = scheduler.Appointments.GetAppointmentsInRange(e.TimeSlot.Start, e.TimeSlot.End);
        e.TimeSlot.Control.Controls.Add(new Label() { Text = "Count: " + aptsPerSlot.Count });
    }
}

Then, you can hide the appointments in the month slots with the following styles: 

<style>
    .mobile-timeslot .rsWrap:not(.rsDateWrap){
        display:none;
    }
</style>

Regards,
Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
Alfred
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or