Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as $ from 'jquery'
import { Calendar, ExternalDropping } from 'fullcalendar'
let $document = $(document)
Calendar.on('initialRender', function(calendar) {
const handleDragStart = function(ev, ui) {
const handleDragMove = (ev, ui) => {
calendar.handleExternalDragMove(ev)
}
const handleDragStop = (ev, ui) => {
calendar.handleExternalDragStop(ev)
$document
.off('drag', handleDragMove)
.off('dragstop', handleDragStop)
}
$document
.on('drag', handleDragMove)