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

Bug 🐞: min + max props breaks layout. #999

Closed
karltaylor opened this issue Sep 23, 2018 · 2 comments
Closed

Bug 🐞: min + max props breaks layout. #999

karltaylor opened this issue Sep 23, 2018 · 2 comments
Labels

Comments

@karltaylor
Copy link

Do you want to request a feature or report a bug?

Bug

What's the current behavior?

Passing min and max props breaks the position of events.

https://codesandbox.io/s/14jq64y553

screen shot 2018-09-23 at 14 02 57

What's the expected behavior?

Events to be in the correct position.

@karltaylor karltaylor changed the title min + max props breaks layout. Bug 🐞: min + max props breaks layout. Sep 23, 2018
@jquense jquense added the bug label Oct 3, 2018
@dmitrykrylov
Copy link
Contributor

I created a pull request to fix this issue

@janb87
Copy link
Contributor

janb87 commented Nov 2, 2018

You have to deduct one minute (eg 17:59 if you want 18:00).

This piece of code is causing it (but I think it is by design, 0:00 -> 23:59).
https://github.com/intljusticemission/react-big-calendar/blob/master/src/utils/TimeSlots.js#L14
1 minute is added to totalMin var. A little bit further the numGroups is calculated and the number is rounded to the top (Math.ceil). This will cause numGroups to be incorrect (1 too much).

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

4 participants