Hi,
How can I reload the calendar after a drag in drop on a event ?
My purpose is to change de background color of the event after edit. I successed to do it my effect can only be displayed after page reload.
Thanks !
Reading FullCalendar documentation, i found that :
var calendar = new Calendar(calendarEl, {
events: [
// events here
],
editable: true,
eventDrop: function(info) {
alert(info.event.title + " was dropped on " + info.event.start.toISOString());
if (!confirm("Are you sure about this change?")) {
info.revert();
}
}
});
But I don’t know where and how to customize this sample in PHPMaker.
Help please !
You may search “calendarOptions” in this forum.
I already went through the forum in this sense, but no post on calendarOptions allowed me to reload my page. The samples I found are about calendar customization, but not about event management.
The “eventDrop” (or other callbacks) is only a property of ew.calendarOptions.fullCalendarOptions.
But how to catch eventDrop event ?
There is no need to “catch” yourself. As the FullCalendar docs says, the “eventDrop” handler is
Triggered when dragging stops and the event has > moved to a different day/time> .
Thank you,
By the way, here is what I want to do :
when I change the date of an event by drag and drop, I change its background color in the database. But I have to reload the whole page to see the change of the event background. So I want to reload the page after the drag and drop.
Your eventDrop() should update the event background by JavaScript also.