Reputation: 11
fullcalendar 1.4.7 allow adding new events by dropping them onto the calendar from an external list of events. I would like to update the title of an existing event by dropping another event from the same list. How i can do that. I wrote this function (below) and i call it from the "bindSegHandlers" function of fullcalendar.js but it doesn't work, a new event is created.
function droppableEvent(event, eventElement) {
eventElement.droppable({
accept: '.myevent',
tolerance: 'pointer',
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(ev, ui) {
alert('call dropped');
}
});
}
Can you help me?
thanks
Upvotes: 1
Views: 2510
Reputation: 3315
It may not be a direct answer to your question but you can consider it as an alternative option. I have used another jQuery based calendar plugin named Calendario and its pretty easy to add events in it.
Upvotes: 0
Reputation: 1442
I found the solution by myself: eventRender is the right place for that!
$('#calendar').fullCalendar({
eventRender: function(evt, element) {
element.droppable({
accept: '.myevent',
tolerance: 'pointer',
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(ev, ui) {
alert('call dropped');
}
});
},
....
....
});
it is not necessary to modify fullcalendar.js
Upvotes: 1