3
Vote

Overlapping Appointments

description

I have a situation where appointments overlap. This is illustrated with the attached test appointments. This data came from a customer with whom I am trying to use your control. It works beautiful except for this overlap.
 
Also, I am confused. It seems that there are two versions. Calendar_1.0.zip and calendar-2817.zip and they are not the same. Which version is the latest code release? They also have the appointment different: one uses Subject and the other uses Title. It is a tad confusing.

file attachments

comments

joseluisgv wrote Aug 7, 2008 at 8:18 AM

Yes, I have the same issue.

I'm trying to solve it in my own code and when I'll get the solution I'll tell you (soory for my english).
We can solve that matter in: DayView.cs --> DrawAppointments.

This method is the responsible of drawing it, after calling GetMaxParalelAppointments to know, for each "half-hour-box", how many appointments share the "line". Then it calculates the width of the drawing appointment.

The matter is when 2 coincidents appointments are: one with X=0 and the other with X=max width of DayView.... then "this one" put lastX=0, so it overlaps with other...

Any help trying to solve this?

wrote Aug 7, 2008 at 8:23 AM

huan086 wrote Dec 3, 2009 at 8:00 AM

Reduced test case for the above
        Appointment appointment = new Appointment();
        DateTime m_Date = DateTime.Now;
        int thisYear = m_Date.Year;
        int thisMonth = m_Date.Month;
        int thisDay = m_Date.Day;
        appointment.StartDate = new DateTime(thisYear, thisMonth, thisDay, 7, 30, 0);
        appointment.EndDate = new DateTime(thisYear, thisMonth, thisDay, 14, 0, 0);
        appointment.Subject = "My test 1";
        appointments.Add(appointment);
        appointment = new Appointment();
        appointment.StartDate = new DateTime(thisYear, thisMonth, thisDay, 8, 30, 0);
        appointment.EndDate = new DateTime(thisYear, thisMonth, thisDay, 9, 30, 0);
        appointment.Subject = "My test 2";
        appointments.Add(appointment);
        appointment = new Appointment();
        appointment.StartDate = new DateTime(thisYear, thisMonth, thisDay, 9, 00, 0);
        appointment.EndDate = new DateTime(thisYear, thisMonth, thisDay, 10, 10, 0);
        appointment.Subject = "My test 3";
        appointments.Add(appointment);
        appointment = new Appointment();
        appointment.StartDate = new DateTime(thisYear, thisMonth, thisDay, 9, 40, 0);
        appointment.EndDate = new DateTime(thisYear, thisMonth, thisDay, 10, 20, 0);
        appointment.Subject = "My test 4";
        appointments.Add(appointment);

wrote May 15, 2010 at 8:36 PM

wrote Feb 14, 2013 at 7:53 PM