Issue 2185: Event present twice when added and rendered with ajax
Status:  Done
Owner: ----
Closed:  Jun 2014
Reported by nafania...@gmail.com, Jun 17, 2014
Hello.
Firstly, thanks for your work.
Secondly, I have an issue which i can't resolve and hope for your help.

I have calendar, which gets events via ajax in each month.
Each event adds by user via ajax.
And i have bug.
When user adds event to not current month but for month in past or future then go to current month and then go back to month with his event, this event presented twice in calendar.
Each event for me has unique id, but calendar render them twice.

Here is fiddle for it http://jsfiddle.net/25Pwm/5/

First - press Add event button at top of calendar, then go to 6 February 2010.

As you see there are two events with title 409 and id 410. First added with user input (button) and second loaded via json, but they are the same.

I think, when calendar renders full month via ajax or json it must clear all events before render or not render items, if calendar has items with id, which already present in calendar.

PS sorry for my bad english.
Jun 19, 2014
Project Member #1 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Reproducing
Labels: Type-Bug
Jun 23, 2014
Project Member #2 adamrs...@gmail.com
If i understand correctly, you expect the `renderEvent` method to *not* render the new event, because it already exists on the calendar via an AJAX event feed.

This is normal FullCalendar behavior. FullCalendar allows multiple events with the same ID to exist on the calendar at a time. In fact, that is how recurring events work, they share the same ID.

If you do not like this behavior (and wish to prevent multiple events with the same ID or whatever from coexisting), that is something you'd have to regulate yourself. You might need to do a call to the `clientEvents` method before calling `renderEvent` to see if the calendar already knows about the event.
Status: Done
Jun 24, 2014
#3 nafania...@gmail.com
Ok, i understand. But how i can regulate it yourself?
I can't find any before render callbacks, that i can use to filter events.