Scheduler WeekView truncating All Day appointments

4 posts, 0 answers
  1. Robert Helm
    Robert Helm avatar
    54 posts
    Member since:
    Feb 2009

    Posted 13 Apr 2015 Link to this post

    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?

     

     

     

     

  2. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 15 Apr 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robert Helm
    Robert Helm avatar
    54 posts
    Member since:
    Feb 2009

    Posted 15 Apr 2015 in reply to Plamen Link to this post

    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>
  5. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 16 Apr 2015 Link to this post

    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.

     
Back to Top