[FullCalendar 2] How to enable List Draggable Item on full calendar
Question
fullcalendar-2
Forge component by Grazina

Hi,

I am using the list draggble Item of the Full Calendar 2. I have a list allowing to be dragged but when I drop it over the full calendar nothing happens. No event handler is triggered, no debugger is triggered...

"droppable: true" was added in the full calendar configurations and it still doesn't work.

I created a simple test screen, a list with text on ListDraggableItem and a full calendar to develop the functionality and try to find the solution without any "noise" of other functionalities.

Do you guys think that we need to change the FullCalendar JS? Or only the configurations of the Fullcalendar on the screen?

Thanks in advance for your help.

 

Solution

Hello Clarisse,

I also was unable to get the draggables working for me. After looking through some documentation (see: https://fullcalendar.io/docs/external-dragging-demo ) I ended up creating my own draggable blocks. 

I'm attaching the module so you can have a look.

Regards,

Anna

FullCalendarExternalDragAndDrop.oml

Hi Anna!

Thank you for your help! The draggables are working :)

Just a quick question, the solution was:

  • Add a class to the  'DraggablesContainer' - "Outer container for the list of elements that are to be draggable";
  • Add a class to the 'DraggableItem' - "block that encases an individual item that is to be draggable and will interact with the calendar.";
  • Add an event listener to  initialize the Draggables on the screen ('InitializeDraggables') - "Needs to be initialized in the same page as the calendar. For the draggables to work, the Calendar block needs to be rendered on the page when the page is loaded. It cannot be inside an If widget to be displayed later."
  • Changes to the Full Calendar widget JS?

I am asking this to understand what was done and how should I use this feature in my app. 

Should I use your blocks and the customized fullcalendar widget? Or this change will be incorporated into the 'FullCalendar2' forge component?

Thank you, once again.

Regards,
Clarisse

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.