jquery - fullcalendar.js: dragging multiple External events -
im trying drag multiple external events using fullcalendar.io !
first im selecting external elementes clicking mouse. im using this:
$('#external-events .fc-event').each(function() { $(this).click(function(){ $( ).toggleclass("selected"); });
so far good...
now, when drop object can find element droped doing:
... drop: function() { $('.fc-event.ui-draggable.selected').each(function() { //alert($(this).text()); //$(this).toggleclass("selected"); })
but now... how can creat elements dropped on calendar ex. 15 minutos duration each?
thanks
best regards
i did looping each 'clientevents' in draggable calendar, checked class, , added new event calendar.
drop: function(date, jsevent, ui) { $.each( $('#external-events .fc-event').fullcalendar('clientevents'), function(index, event) { if( $(this).hasclass('selected') ) { var newevent = [{ title: event.innerhtml, start: date, allday: true }]; $('#calendar').fullcalendar('addeventsource', newevent); $(this).toggleclass("selected"); } });
***edit: using fullcalendar v2.2.6
Comments
Post a Comment