search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Event is displayed twice (Dynamic Loading)

Asked by Michael
10 years ago.

Hi,

I am loading all my events via AJAX/JSON and add them to my scheduler. After moving an event in the scheduler the new date (start, end, resource) will be saved in the backend. That works perfect.

But when I load then again the events via AJAX/JSON (onScroll event), my moved event is added again to the scheduler. So the result is, that I see this event twice. All other (unmoved) events are still displayed only once.

What is the trick I am missing?

Here is the code how the events will be added after loading the JSON from the server, nothing special:

args.async = true;
var events = [];

$.each(data, function (i, row) {
var e = {
start: row.start
,end: row.end
,id: row.id
,resource: row.kennzeichen
,text: row.title
,backColor: row.color
};

events.push(e);
});

args.events = events;
args.loaded();

Regards,
Michael

Comment posted by Dan Letecky [DayPilot]
10 years ago.

Let me check the issue.

Answer posted by Dan Letecky [DayPilot]
10 years ago.

This bug is fixed now in build 7.7.781. Please see the sandbox:

http://javascript.daypilot.org/sandbox/

Comment posted by Michael
10 years ago.

Thank you very much! I have tried it with the new build and it looks good! :)

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.