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

Multi-day renders end day incorrectly if time is less then 00:01:00 #2638

Open
5 tasks done
zelucena opened this issue Aug 6, 2024 · 0 comments
Open
5 tasks done
Labels

Comments

@zelucena
Copy link

zelucena commented Aug 6, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/nice-https-lyxs9d?file=%2Fsrc%2FApp.js

Bug description

Let's say I have an event that goes from 02/08/2024 00:00:00 until 04/08/2024 00:00:00. It is supposed to show as a three-days long event. Problem is that the end date shows as 03/08/2024. I have to set at least one minute at the end (04/08/2024 00:01:00) so it renders correctly. The date conversion is correct, it's translated correctly and everything else seems to work as expected. Please see the sandbox with the problem. I copy-pasted my actual running code, just stripped the typescript and commented out next navigation.
image

Expected Behavior

The event should render on the correct days span regardless of the end time (hours, minutes, seconds).

Actual Behavior

It doesnt show the correct days span if the end time is something between 00:00:00 and 00:00:59.

react-big-calendar version

1.13.1

React version

18.3.1

Platform/Target and Browser Versions

Windows Chrome 127.0.6533.89

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
@zelucena zelucena added the bug label Aug 6, 2024
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