question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drop event outside of calendar / between calendars

See original GitHub issue

Originally reported on Google Code with ID 550

Hi,

I would like to drag the events from the calendar back to the Draggable Events list.
I couldn't find anywhere on how to do that. Is it possible you add this enhancement?


Thanks.
Shen.

Reported by sfu%monetrics.com@gtempaccount.com on 2010-07-08 20:44:57

Imported with 49 stars.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:13
  • Comments:74 (56 by maintainers)

github_iconTop GitHub Comments

3reactions
empty-backcommented, Sep 12, 2019

Hello,Has the problem been solved?I want drag delete event with 3.10.0,How to do that?Thanks!

1reaction
em1lecommented, Jun 24, 2020

Hi there, i encountered that problematic recently. I had to drag events from fullcalendar (angular) to a side menu with 3 divs representing different action (remove, replacement and cancel).

The workaround uses dragstop event to catch event.jsEvent.clientX and event.jsEvent.clientY. From then, one could use document.elementFromPoint(x, y) to get the targeted element and element.closest('.some-class-or-#some-id) to retrieve the exact element one want.

export class MyComponent implements OnInit {

  @ViewChild('calendar') calendarComponent: FullCalendarComponent;
  calendarApi: Calendar;

  ...
  actionOnDragStop (e) {
    let x = e.jsEvent.clientX;
    let y = e.jsEvent.clientY;

    let element = document.elementFromPoint(x, y);
    let actionDivElement = element.closest('.action-div');

    if (element.id !== null) {
      if (element.id === 'removal') {
        let curEvent = this.calendarApi.getEventById(e.event.id);
        curEvent.remove();
      }  
    }
  }
  ...
}

This may be not suitable for every use cases and is not very solid triggered on dragstop instead of a proper drop.

I hope it can help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

External Event Dragging - Docs
It's possible to take elements that live outside of a calendar and make them drag-and-droppable. When they are dropped on a specific date...
Read more >
Event calendar External drag and drop Example
JQuery calendar with external drag-drop events. Create events by dropping elements from outside of the calendar.
Read more >
Drag and drop between multiple FullCalendars?
Is there a way to render multiple months using FullCalendar, and enable users to drag an item/event from one month to another? fullcalendar....
Read more >
Block out vacation time on a group calendar
to open Calendar. In the navigation pane, select All Group Calendars and select your group. If you have multiple calendars open, the events...
Read more >
(08) Drag and Drop Events in full Calendar js - YouTube
Drag and Drop Events in full Calendar jsDocs Event Dragging & ResizingHow to enable and control where the user can drag-n- drop and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found