angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

Updating eventSources before server response results to duplicate entries #298

Closed loykianos closed 9 years ago

loykianos commented 9 years ago

I have an application where the user can filter out appointments through a list of checkboxes.

Clicking on a checkbox changes the eventSources model, which fires a request to the server as intended, which is shown below. calendar

The problem appears if somebody clicks a checkbox multiple times, without waiting for the response from the server. The result is the following. calendarmash

Is there a way to fix this? If I had access to the request's promise, this wouldn't be a problem, but eventSources are handled in ui-calendar, which makes it hard to manage.

joshkurz commented 9 years ago

There are many different ways to fix this but it is more of a Model issue than a view issue. I am going to close this as a wont fix. You code allows the user to do this, which alters your model, which reflects in the calendar. Just dont let your model get altered and the calendar will work correctly.