-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag And Drop outside the calendar [SOLVED] #318
Comments
How did you solve this? |
Hello @spacedust, I created a drop target component, where I am passing a function (where I strip the date off the event and in the drop zone component I filter the events without dates) as a prop and call it on a React DND drop() method. Hope it makes sense, here is an example:
It is working for me, but I am not so sure if calling a function from |
@martinnov92 how do you pass the location of the event to the droppable? could you elaborate on "where I strip the date off the event and in the drop zone component I filter the events without dates". Do you wrap the whole BigCalendar inside connectDropTarget? |
Hello, I can't remember now, might have a look on it on Monday. By strip the date off I mean that I removed date from event to not to display it in the calendar. And no, the big calendar is already drop target I think. If I don't forget I will add example on Monday. |
Oh and you have to set the correct name for drop target (the name you set when you are adding connectDropTarget(name,...)). I think the name should be "Event"... |
Thank you @martinnov92 I'll check it out =) |
Can anyone post a working example of outside drag n drop to calendar please? |
@SagiSan Here is an example on my repo https://github.com/Tim1023/react-scheduler-firebase. Hope it can help you |
@SagiSan nice! it used to work for big-calendar 19 but new updates (https://github.com/intljusticemission/react-big-calendar/tree/master/src/addons/dragAndDrop) cause the drop is always diabled. may be the item type changed? or they used another plugin (because if you look the file EventWrapper ) there is no dropTarget. |
@Abenezer have you found any way to make it work? Also you @ the wrong person. |
@Abenezer have you found a way to make it work on v 20. and up? |
@Abenezer Is there any way I can make it work with v20 and up? It will be a great help. |
@Tim1023 Do you have any update example with v20. The above example doesn't work with v20 and up. |
Hello,
is it possible to drag and drop something to calendar from the outside (let say that I create a draggable div and want that div to be able to DnD to calendar)? Or is it only working inside the calendar?
Thank you very much.
Update: solved
The text was updated successfully, but these errors were encountered: