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

Event width bug with no-overlap prop in week and day view #2471

Open
4 of 5 tasks
adamkjall opened this issue Nov 22, 2023 · 0 comments
Open
4 of 5 tasks

Event width bug with no-overlap prop in week and day view #2471

adamkjall opened this issue Nov 22, 2023 · 0 comments
Labels

Comments

@adamkjall
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/examples--example-3

Bug description

Hello guys,

I have found a bug with the events width in both the week and day view, the issue is that an events width doesn't fill the space that is available when using no-overlap prop.

image

In the image the column for the 15th has the bug and the 16th column is performing as expected. The issue is that the event with title "3" in the 15th column should take up the available space, but it doesn't. In the 16th column the event with title "3" does take the available space.

To reproduce this bug use the no-overlap example page https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/examples--example-3

  1. Go to week or day view
  2. Create and event spanning 01.00 - 02.00
  3. Create another event on the same day spanning 01.00 - 02.00
  4. Create another event on the same day spanning 03.00 - 04.00
  5. Create another event on the same day spanning 01.30 - 05.00

After performing these steps it will look like this
image

I've tried to look into the code but it is quite complex so hope someone with better knowledge can do this. My finding is that the event "3" is in event "4" friends list in the dayLayoutAlgorithm, but so is also event "1" and "2", so when the calculation for the width of event "3" is taking place the event "1" and "2" is taken into account even though they shouldn't be.

Hope this help :)

Expected Behavior

No response

Actual Behavior

No response

react-big-calendar version

1.8.5

React version

18.2.0

Platform/Target and Browser Versions

macOs Chrome 119.0.6045.159

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
@adamkjall adamkjall added the bug label Nov 22, 2023
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

1 participant