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

Incorrect Calendar display and missing dates in 'month' view when using dayjsLocalizer - March 2024 #2534

Open
4 of 5 tasks
ncaraker opened this issue Mar 12, 2024 · 4 comments
Labels

Comments

@ncaraker
Copy link

ncaraker commented Mar 12, 2024

Check that this is really a bug

  • I confirm

Reproduction link

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

Bug description

When using the dayjsLocalizer the month view for March 2024 is incorrect. March 10th 2024 is missing entirely and the days of the week display do not align with the dates on the calendar. This can be seen in the storybook examples provided (here) Note: To reproduce this you must view March 2024 on this story

Expected Behavior

All dates should show on the calendar. The days of the week should start on Sunday and should align with calendar dates as expected

Screenshot 2024-03-12 at 4 39 13 PM

Actual Behavior

March 10th 2024 is missing entirely from the calendar, and the days of the week start on incorrect day and do not line up with the corresponding days on the calendar.

Screenshot 2024-03-12 at 4 41 56 PM

react-big-calendar version

1.11.2

React version

^17.0.2

Platform/Target and Browser Versions

All platforms

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
@ncaraker ncaraker added the bug label Mar 12, 2024
@sethmcleod
Copy link

We're also seeing issues with the dayjs localizer. Not the same as you (March 10 isn't missing) but many of the days in March are incorrectly rendering as out of range. This happens for all the years we've tested and is reproducible in the Storybook. Switching to Moment localizer resolves the issue.

image

@prescarlton
Copy link

i can take a look at trying to tackle this.

@prescarlton
Copy link

Looks like it's directly related to leap years.

prescarlton added a commit to prescarlton/react-big-calendar that referenced this issue Apr 16, 2024
this commit fixes the issues mentioned in jquense#2534
@martin-luo
Copy link

This issue still exists in version 1.13.1.

Here is how it looks when I use dayjs as the localizer:
image

And here is how it looks when I use luxon:
image

As we can see, the cells for 01 - 05 is not rendered correctly

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