angular-ui / ui-calendar

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

Fix issue with event rendering #353

Closed matiascaputti closed 8 years ago

matiascaputti commented 8 years ago

Fix event issue that make them disappear if switch with previous/next or change date from calendar.

flick36 commented 8 years ago

346

martin-langhoff commented 8 years ago

My initial reaction to this is so-so. The standard behavior of FC is to default to ephemeral events. angular-ui-calendar is wrapping FC, so overriding FC default behaviors needs to be done with due care.

In my code using angular-ui-calendar, I set sticky in the draggable object "event" properties, or register an eventReceive() cb and apply the fixup there.

In other words, sticky definitely deserves an FAQ, but I'm not sure it deserves an override.

@arshaw - I am interested in your take on why FC defaults to ephemeral (sticky: false) for 'received' events from a drag&drop action.

arshaw commented 8 years ago

because usually upon drop of an event, a write call is made to the backend DB, and if the user navigates away from the current view and back again, the end-user will receive the newly created event from the DB, and if it was sticky when it was added, they will see two. that was my thought process

martin-langhoff commented 8 years ago

@arshaw - thanks!

@maticaputti , @flick36 -- at this time I do not think it is a good idea to merge this. Reasons:

I don't like to see a nice convenient patch go to waste but...