-
Notifications
You must be signed in to change notification settings - Fork 723
Event disappear after switching months #99
Comments
This is an issue with the fullcalendar library itself. It is a known issue that not event v2 of the calendar.js fixes. |
Is there a workaround for this issue? This would be a pretty serious issue for me since the calendar does not display correctly even the eventsource data is correct. |
I do not have a great solution for this atm. Honestly right now if this was plaguing my application I would have the renderEvent method in the calendar just do this
as a simple workaround. This makes the calendar flash for a split second, but it's better than disappearing events. |
Hi joshkurz, I followed your suggestion but it didn't work. |
henyana, for me it's working if I modify it as:
Anyway, it provokes the refresh of the calendar, so if the user has move to another screen, it will return to the first one. Is the same if you click 'Hungarian' button in the demo. When the eventsWatcher.onAdded() calls renderEvent(), the 'stick' property is always undefined. From fullCalendar documentation:
So, Why (before deleting) the events are 'sticky' if the property is undefined? |
I do not think there is an official issue.
|
Hi joshkurz, I've try to reproduce this behavior directly in fullCalendar to open an official issue. Why do you think is an issue with the fullcalendar library itself? In fact, if instead of adding the event to the array that is being watched by the eventsWatcher I call
Then it works good. |
I did add stick === true to the calendar before, but I ran into another On Thu, Jun 5, 2014 at 9:23 AM, vanHuntsman [email protected]
Josh Kurz |
I want to make clear though that I am not ruling uiCalendar out of the On Thu, Jun 5, 2014 at 10:11 AM, Josh Kurz [email protected] wrote:
Josh Kurz |
Thanks for the links @joshkurz
Although adding and removing events directly calling .fullCalendar('renderEvent'...) is working ok for me, I'm really interested in making it run with the power of angular watchs provide by uiCalendar. If I could help anyway, let me know. I've try to isolate the problem just using fullCalendar to report a bug without results. |
Yes, what we need to do is prove where the bug lives, by creating a failing I have checked the $scope's events array to see if items are being On Thu, Jun 5, 2014 at 11:27 AM, vanHuntsman [email protected]
Josh Kurz |
Any updates on this? Seems like a pretty major problem. |
I created pull request #140, this is the fix I am currently using |
I'm not sure if thats related, but I just fixed a similar issue. When i modified a date than switched the calendar view (day/week/next month), the event would desapear. When i checked the object before and after, i noticed that the date object type changed from FCMoment to Moment. To fix the issue, I simply had to convert the Moment to a FCMoment using $.fullCalendar.moment(date, format). (My guess is that the same thing happens when you give it a String or a Date) |
just go to your calendar.js and change onAdded |
@vanHuntsman the last one i used this link https://github.com/angular-ui/ui-calendar/blob/master/src/calendar.js#L251 i also used this tutorial http://www.oodlestechnologies.com/blogs/Fullcalendar-Walk-through-with-AngularJS |
@linkolen thanks. Your solution, worked for me. By passing the third argument as true, to fullCalendar, the events are now sticking. |
@desertzebra you are welcome. |
@linkolen Thanks :) ( FullCalendar v2.1.1 && last angular ui calendar ) |
Same problem for me with fullcalendar 2.2.6 and latest angular ui calendar |
Hi, I got this problem and then I modified the onAdded function as @linkolen suggested. It worked, but then I realized that when I dragged and dropped an event and tried to update it, I got this error: TypeError: Converting circular structure to JSON. I noticed that the event object has the "source" attribute which makes the event object have circular structure. Does anybody have the same issue? Or can you suggest a solution for this? |
@anphu7492 I'm getting the same issue with the TypeError using @linkolen suggesting. In fact if I go in to modify the date object at all (i.e. increment the hour) I get that error. Still looking into a fix, either for the original issue that doesn't lead to this error, or a way around this. EDIT: After doing this, works like a charm. I had to add it to the eventResize handler as well. I'm sure there's a better way, but this works for now. |
Hi @Dlsqueak , Thank you for your suggestion. I also did the same thing. Actually, I deleted the 'source' property whenever I have to do something with the server. :D |
@linkolen Your solution works awesome for me. Thanks! (FullCalendar v2.1.1) |
you are welcome @jstoddardiv |
@linkolen thanks dude! |
If you add the event with the stick flag true then the event will stick to the calendar. var event = {
title : $scope.newSchedule.expertise.toUpperCase().replace('-','_'),
start : date,
end : moment(date).add($scope.newSchedule.duration | 0 , "minutes").toDate(),
stick : true,
// expertise : $scope.newSchedule.expertise,
// type : $scope.newSchedule.type,
// repeat : $scope.newSchedule.repeat,
}; |
Still don't get it working properly. Is there a one complete fix on this issue? |
The stick property worked for me. Perhaps this issue can be closed. |
setting |
The calender is supposed to load monthly events. notice the event persist when switching between different days and weeks within the same month. |
stick solved my problem too. |
This is a bit of a FAQ of FC itself. Set event to stick. FC author explains his rationale on #353 . |
stick as true solved my problem too. |
@linkolen thanks... worked for me too |
When you paste
|
when using dow and stick together it causes duplicated events |
$('#myCalendar').fullCalendar('renderEvent', myEvent, true); this work for me, thank you |
yes thanks a lot u gave me correct solution |
$scope.getAllTimelineByPOID = function (PurchaseOrderID) {
i'm facing same problem , help me out |
i'm also looking for it |
I was using this ui-calendar and found a issue that the event will disappear after switching to different months. The same issue happens on the demo here
http://angular-ui.github.io/ui-calendar/
delete some existing event -> add new event -> move the event to a different date -> go to next month -> go back to the current month
Then the new event will disappear. Note that the event is still on the list but just not on the calendar. I have tracked the behavior in the js console, and the source is still correct, but if I do $('#Calendar').fullCalendar( 'clientEvents' ); it does not show up that newly created event.
The text was updated successfully, but these errors were encountered: