arshadulla / jquery-week-calendar

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

Sometimes dragging an event will make it go back to its original slot though there are no restrictions #121

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to 
http://jquery-week-calendar.googlecode.com/svn/trunk/jquery.weekcalendar/weekcal
endar.html

2. Move around different events. If you are lucky, some of them will return
to the slot in which they were when you started dragging

Possible solution

I think there is a bug in function _addDroppableToWeekDay

//This line:
//var newCalEvent = $.extend(true, {start: eventDuration.start, end:
eventDuration.end}, calEvent);
//should be:
var newCalEvent = $.extend(true, calEvent, {start: eventDuration.start,
end: eventDuration.end});

I have changed it and it seems to work ok. I think that the new start and
end should be copied on those of calEvent, not the other way round.

What version of the product are you using? On what operating system?
1.2.2-pre. Firefox 3.6, jQuery 1.4, Windows 7

Please provide any additional information below.
This plugin is the best one for showing a week calendar. It is well writen
and easily customizable. Congratulations!

Original issue reported on code.google.com by jmperez1...@gmail.com on 22 Jan 2010 at 5:31