[FullCalendar Reactive] Getting the id of an event using the OnClick or OnDrop
Forge component by André Cabral
Application Type
Reactive

Hello everybody,


I am using the FullCalendar Reactive and I have found some problems that I did not know how to solve. On my last post, one of them was resolved, after that I have found another barrier.

As the title of this post says, the problem now is to access to the id of an event to be able to drag and drop it into another day or just to edit it. The events on the calendar are set as structures and I have an entity Event in the database where I store all the events. This entity has got the same attributes than the structure.

When I drag and drop an event, I recieve the id of the structure, which is empty and I do not know exactly how to get the id of that event in the database.

If something is not clear enough, please let me know and I try to explain it better.


Thanks in advance!

Best regards

Solution

Hi Ismael Bertaïba Fernández,

Created an OML where I am trying to update the event on the basis of Id.  Please check it.


I hope now to solve your doubt.

Amit Jain

Calendar1.oml

Hi Ismael,


Can you attach a small oml for this, so we start analyzing the data structure and working with the same constraints?

Hi Maxime,


Sure! Here I atach an oml simplified with the more important things related with the drag&drop.


Thank you!

DragDrop.oml

Hi Ismael,


Sorry but there are too many missing dependencies for me to easily reproduce, debug and find adjustments... Would you be able to extract/duplicate a part that I could run?


Thank you

Hi Maxime,


To the oml of the last post you will need to add this module and the plug-in of FullCalendar Reactive from the Forge.


If you need anything else please tell me.

Thanks!

DragDropCore.oml

Solution

Hi Ismael Bertaïba Fernández,

Created an OML where I am trying to update the event on the basis of Id.  Please check it.


I hope now to solve your doubt.

Amit Jain

Calendar1.oml

Also, remember to put the Id of the eventsourcedata when et to the source.

Thank you both for your answers!


In the end I tried to adapt the oml that Amit posted to my own project. It was not exactly the same approach as I do not have a block, but it gave me an idea of how to do it and I modified some things to make it work . 

For now it is working, i still have some bugs with the Date of the event after drop. Sometimes te event has a null end date that brakes the calendar making an event of 4000 days of duration, but I am working on the problem.


Best regards

I am glad that you resolved your issue.

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