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

onSelecting gives wrong time slot when dragging cursor upwards (from desired end to desired start time) #2290

Open
4 of 5 tasks
GitHubAcc12 opened this issue Oct 28, 2022 · 4 comments
Labels

Comments

@GitHubAcc12
Copy link

GitHubAcc12 commented Oct 28, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/props--on-selecting

Bug description

Using onSelecting(), when selecting a slot by dragging upwards instead of downwards (i.e. clicking where the slot should end and moving the cursor up to the time where it should start), and then holding the mouse button down while waiting once the slot is selected, the calendar will instead select the desired start time as end time and set the start time to 00:00:00 on the selected day.
When reproducing with the reproduction link, the first alert will be issued for the correct time slot, then the selection will change and also output the incorrect time slot.

Expected Behavior

No response

Actual Behavior

No response

react-big-calendar version

1.5.0

React version

18.2.0

Platform/Target and Browser Versions

macOS Monterey 12.6, Google Chrome 106.0.5249

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
@qiweiii
Copy link

qiweiii commented Jun 14, 2023

I have the same issue, this is affecting user experience. If someone can guide me on how to fix this, I am willing to put up a PR asap.

@bu6n
Copy link
Contributor

bu6n commented Jun 14, 2023

I don't know if it helps, but the bug does not happen on Firefox, maybe that's a place to start?

@qiweiii
Copy link

qiweiii commented Jun 14, 2023

Appreciate your quick response, turns out it works! Should be a bug in my code..😅

@bu6n
Copy link
Contributor

bu6n commented Jun 14, 2023

It could potentially be a bug with react-big-calendar in Chrome also, there are 1-2 other bugs that only happen there, but I haven't looked into them yet

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

3 participants