Open pnrdk opened 7 years ago
I have same problem.....
Adding new events issue
When adding new events to the calendar they can disappear when switching months. To solve this add
stick: true
to the event object being added to the scope.
@jhgil Thanks very much for sharing the solution with me! It Works :-)
https://fullcalendar.io/docs/event_rendering/renderEvent/
I did this in jQuery and it works. May be, this code can help someone.
var event = new Object();
event.id = 123; // unique event id;
event.title = 'some title';
event.start = new Date(2017,11,4, 00, 00);
event.end = new Date(2017,11,6,00,00);
$('#calendar').fullCalendar( 'renderEvent', event, true );
// 3rd parameter is - `stick: true`
guys, the thing is when my page initially is loaded all my events from the database are shown after I add an event I'm inserting into the DB removing the events then refetching works like a charm to remove duplicate data but when I press the previous and the next button the only thing that will appear is the last event rendered in the calendar all the rest are gone and I'm using stick true
I am adding stick: true to the event object and it all it does is disables the arrow buttons to go to next and previous months. I still want to be able to look at other months but also keep my events rendered.
Adding new events issue
When adding new events to the calendar they can disappear when switching months. To solve this add
stick: true
to the event object being added to the scope.
You're the best
@jhgil and @mahfuz10 I love you guys!
https://fullcalendar.io/docs/event_rendering/renderEvent/
I did this in jQuery and it works. May be, this code can help someone.
var event = new Object(); event.id = 123; // unique event id; event.title = 'some title'; event.start = new Date(2017,11,4, 00, 00); event.end = new Date(2017,11,6,00,00); $('#calendar').fullCalendar( 'renderEvent', event, true ); // 3rd parameter is - `stick: true`
you saved my time, thanks bro.
Confirmed that "true" for the sticky flag works. Thanks.
When I add new events to the calendar after the calendar already has been loaded, they are being added like they shall. But when I am switching the month forward and afterwards backwards, the event has disappeared. I think the same thing is happening in your demo.
What to do?
Thanks very much in advance.