Calendar: Fix drag and drop across weeks

Couldn't drop an event from one week to another
This commit is contained in:
nathan 2023-03-17 13:45:54 -06:00
parent 25207003df
commit 3b8b902194

View File

@ -362,15 +362,16 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet
// Cancel drag to create, we're dragging an existing event
timegrid.drag_create.start = null;
timegrid._drag_create_end();
timegrid.div.on("dragover.timegrid", (e) =>
{
timegrid._get_time_from_position(e.clientX, e.clientY);
})
timegrid._get_time_from_position(event.clientX, event.clientY);
})
.on("dragend", () =>
{
timegrid.div.off("drag.timegrid");
})
.on('dragover', function(event)
{
timegrid._get_time_from_position(event.clientX, event.clientY);
})
.on('mousemove', function(event)
{
timegrid._get_time_from_position(event.clientX, event.clientY);