thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

Incorrect time when no overlap allowed #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hellow,

first of all thank you for your good work :-).

I noticed that when overlap of events is not allowed, you get incorrect
indications of the time of the appointment. For instance in the full demo
with the popups, consider an event from 3 PM till 5 PM. When you now try to
create a new event from 2 till 4, the event is correctly adjusted to range
from 2-3. However, in the title and in the popup (called by eventNew), you
will still see the hours of the unmodified date.

I think this can be solved by modifying  _setupEventCreationForWeekDay in
the following way (last few lines of the function)

 if (!options.allowCalEventOverlap) {
                  self._adjustForEventCollisions($weekDay,
$renderedCalEvent, newCalEvent, newCalEvent);
                  self._positionEvent($weekDay, $renderedCalEvent);
                  self._refreshEventDetails(newCalEvent,$renderedCalEvent);
// FIX to have the correct title
               } else {
                  self._adjustOverlappingEvents($weekDay);
               }

               options.eventNew(newCalEvent, $renderedCalEvent);  // FIX so
correct timings are passed to eventNew (and the popup in the demo)

Original issue reported on code.google.com by dieter.m...@gmail.com on 7 Jan 2010 at 10:53