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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -