mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.73k stars 868 forks source link

Disable drag & drop event to outside scheduler #1732

Open ck310 opened 3 months ago

ck310 commented 3 months ago

Describe the bug

Hi,

How would I go about disable dragging and dropping event to outside of scheduler.

Thank you,

Minimal reproduction of the problem with instructions

Screenshots

Versions

matts-bot[bot] commented 3 months ago

Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me

ck310 commented 3 months ago

mwlDraggable dragActiveClass="cal-drag-active" [dropData]="{ event: timeEvent.event }" [dragAxis]="{ x: false, y: editMode && timeEvent.event.draggable && timeEventResizes.size === 0}" [dragSnapGrid]="{ x: 0, y: hourSegmentHeight }" [ghostDragEnabled]="true" [showOriginalElementWhileDragging]="true" (dragEnd)="dragEnded(timeEvent, $event, dayColumnWidth, true)"

I have enabled, ghost element and while dragging or resizing it can go outside the view, even tho i have restrictions on where the events should snap to, but this element going outside the scrollable parent is a bit weird.

Is this issue solvable?