Skip to content
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

Drop from outside remove the dropFromOutsideItem after posting it to the DB and getting a new ID #2675

Open
4 of 5 tasks
AronAsmundsson opened this issue Nov 6, 2024 · 1 comment
Labels

Comments

@AronAsmundsson
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/737n67?file=%2Fapp%2Fpage.tsx%3A176%2C13

Bug description

When I use dragFromOutsideItem, and the user releases the item, it always gets added to the calendar, even if I don't have the events state passing to it and no onDropFromOutside.

Even when I switch between weeks, it still sticks in there and only disappears when I drag a new item.

-I cant get the calendar to work in code sandbox but gave the code anyway

Expected Behavior

I want to use the dragFromOutsideItem, and on the drop, I can choose if I allow the user to drop the event there or not (handle the drop and whether or not to add it into events inside the onDropFromOutside. ) so it is not default added to the calendar

Screen.Recording.2024-11-06.at.16.35.17.mov

Actual Behavior

No response

react-big-calendar version

1.15.0

React version

18.2.0

Platform/Target and Browser Versions

macOS safari 18.0.1 and on Chrome

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@ardenc
Copy link

ardenc commented Nov 26, 2024

I am having this issue as well. I am attempting to incorporate block-out dates so a user will not be able to drop an event onto one of those days. But there does not seem to be a way to stop the calendar from adding an event to the calendar from outside. If it is a regular from inside event you can stop the drop by returning false in the onEventDrop prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants