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

Scheduler WeekView truncating All Day appointments

3 Answers 46 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Robert Helm
Top achievements
Rank 1
Robert Helm asked on 13 Apr 2015, 09:01 PM

Since we upgraded to Telerik version 2015.1.225.40, the All Day appointments in WeekView mode are truncated as shown the attachment.

If there are only a few appointments, I managed to programmatically make their width 100%. But as seen in the image, this has no effect when there are many appointments in one day. It's like there's an issue in the computation of the appointment width or something. I noticed in this example all the appointments have style of "width: 2.98578px; margin-left: 63px;" for what that's worth.

Any idea?

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Apr 2015, 06:41 AM
Hello Robert,

The issue is quite unusual and we are not aware of such behavior in RadScheduler. I have tested both locally and on our online demo but the appointments positioned correctly at my side. Would you please elaborate a little bit if your scenario is somehow different so we could inspect it and be more helpful?


Regards,
Plamen
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Robert Helm
Top achievements
Rank 1
answered on 15 Apr 2015, 02:15 PM
I really don't think our scenario is much different, but I could post markup, etc. and I'll try to do that later. However we do have a workaround at the moment. Basically, I added a OnTimeSlotCreated method and in there I identify the All Day appointments, and give them an extra CssClass. Then with JQuery, I set the width and margin to fix the issue. Hopefully this helps if someone is having the same issue.

protected void RadScheduler_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
{
    if (RadScheduler.SelectedView == SchedulerViewType.WeekView ||
        RadScheduler.SelectedView == SchedulerViewType.DayView)
    {
        if (e.TimeSlot.Appointments.Count > 0)
        {               
            foreach (Appointment appt in e.TimeSlot.Appointments)
            {
                if (appt.Duration.TotalDays == 1.0)
                {
                    appt.CssClass += " ALLDAY ";
                }
            }
        }
    }
}
<style type="text/css">
    .ALLDAY
    {
        margin-left: 0px !important;
        width: 100% !important;
    }
</style>
0
Plamen
Telerik team
answered on 16 Apr 2015, 05:06 AM
Hello,

Thank you for sharing the solution with us. If you succeed isolating the issue please don't hesitate to share it with us so we could inspect it and fix it.

Regards,
Plamen
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Scheduler
Asked by
Robert Helm
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Robert Helm
Top achievements
Rank 1
Share this question
or