Javascript 更改事件结束时更改其';通过在FullCalendar中拖动来定位
我正在尝试创建当前拖动事件的动态持续时间。我怎样才能做到这一点 我尝试通过Javascript 更改事件结束时更改其';通过在FullCalendar中拖动来定位,javascript,angular,fullcalendar,Javascript,Angular,Fullcalendar,我正在尝试创建当前拖动事件的动态持续时间。我怎样才能做到这一点 我尝试通过eventPositioned中的setEnd设置事件结束,并进行了适当的检查,因为setEnd再次触发eventPositioned function eventPositoned(info) { const currentEnd = info.event.end.getTime(); // It is not dependent of start-end // Returns epoch const n
eventPositioned
中的setEnd
设置事件结束,并进行了适当的检查,因为setEnd
再次触发eventPositioned
function eventPositoned(info) {
const currentEnd = info.event.end.getTime();
// It is not dependent of start-end
// Returns epoch
const newEnd = getNewEnd(info.event);
if (currentEnd !== newEnd) {
info.event.setEnd(newEnd);
}
}
它可以工作,但当拖动完成时(拖放时)。当我拖动时,事件的大小保持不变