jquery - FullCalendar: get new start / end times while resizing -


i've been trying solve problem few hours now, can't figure out how. have small popover displayed next fullcalendar (fullcalendar.io) event while resizing / dragging , want display new start / end times inside while resizing, displayed on event (this meant confirm / adjust change popover). thought messy approach try use text of event:

$('.fc-helper-skeleton .fc-time > span').text() 

maybe has idea how this. if fullcalendar default, assume there should easy way these values while resizing?

it great if values moment objects while resizing. or there performance reason why feature doesn't exist?

this isn't directly supported... there's pretty way of doing it.

we utilize eventrender , start/stop drag/resize callbacks.

eventrender: function( event, element, view ) {     if(event.changing){ // if event being changed, grab render date         $("#currenttime").html("start: "+event.start.format("yyyy-mm-dd hh:mma")+"<br> end: "+event.end.format("yyyy-mm-dd hh:mma"));     } }, eventresizestart: function(event, jsevent, ui, view ){     // can add properties event object     event.changing = true; // event being changed }, eventresizeend: function(event, jsevent, ui, view ){     event.changing = false; // event finished being changed }, eventdragstart: function(event, jsevent, ui, view ){     event.changing = true; }, eventdragend: function(event, jsevent, ui, view ){     event.changing = false; }, 

jsfiddle

i can't imagine reason wouldn't stable. , it's quite extensible, go lot of directions here.

note not events have end date, null check before using it.


Popular posts from this blog