-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Week view, Event showing twice #2617
Comments
Any one can help me please ? |
Why would this show just the one day if the end of the event is 12:00 AM on a new day? looks correct to me |
Thanks @geraldhoxha95 for the quick reply. Because 12:00 AM is the end, not a start, it looks like it starts from 12:00 am and ends after 12:00 am but I think that is not correct. If the end will be 12:01 am (> 12:00 am) then it is correct. If you see the same case on another standard calendar like google and Outlook it will only show a one-day event for this specific case. Note: this only issue with week view, for day view is working only showing for one day. |
@anjalikalsariya I have a PR that fixes your issue. I don't have enough time to fully test this out, but it seems to solve your issue. Feel free to fork it and use it, i just can't fully test it and guarantee it makes it to master. #2622 Root of the issue is when determining if an event belongs to the week day, it compares the date range of the event to the week day. So since the event ends at 12:00AM of the next day, this is technically in range of the next day. The fix aims to make the comparison more granular, at the minute level, so a time like 12:00 AM gets ignored. |
Thank you so much @geraldhoxha95. I have seen your PR and video clip. Its look like issue resolved. |
@geraldhoxha95 I have seen fix PR is open so Do I need to wait for the merging and new release of package right ? |
@anjalikalsariya to use it with the npm package, yes it will need to be released. There are ways to fork the repo and link your pcakage JSON to that instance, but if you're not comfortable doing that you should wait. I need some time to test this out, I might have some free time over the weekend |
Thanks @geraldhoxha95. I will wait for new release. |
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/react-big-calendar-example-forked-d4yhkq?file=%2Fsrc%2Fevents.js%3A7%2C18-7%2C62
Bug description
Description: I have one event where the start time is 08-07-2024 at 11:00 pm and the end time is 09-07-2014 at 00:00 am.
In this case, the event is showing for both dates 08-07-2024 and 09-07-2014, it should show for the date only 08-07-2024. In Google Calendar it is only showing for 08-07-2024.
Expected Behavior
In the mentioned case, it should show for the date only 08-07-2024. Like the Google calendar and outloook. It is working in day week. issue coming in week view
Actual Behavior
In the mentioned case, the event showing for both dates 08-07-2024 and 09-07-2014
react-big-calendar version
1.12.1
React version
18.2.0
Platform/Target and Browser Versions
All browser
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: