Skip to content

dayJS timezone plugin makes "week" and "day" views start-of-day timezone dependent #2807

Description

@noahsilas

Check that this is really a bug

  • I confirm

Reproduction link

https://bigcalendar.github.io/react-big-calendar/?path=/story/examples--dayjs-localizer

Bug description

In the dayjs-localizer example, the dayjs timezone is loaded. When this is used in the dayjsLocalizer, it causes the rendered calendar's start time to vary based on the browser's timezone.

As an example, in this screenshot I have Chrome's "sensors" tab configured to make the browser act as though it is in New York (currently EDT, UTC -4 hours). The rendered day starts at 4AM.

Image

In this screenshot I have Chrome's "sensors" tab configured to make the browser act as though it is in San Francisco (currently PDT, UTC -7 hours). The rendered day starts at 7AM.

Image

Compare this to the luxon localizer - regardless of which timezone is selected, the day starts at 12:00 AM.

Expected Behavior

The day should always start at 12:00 AM.

Actual Behavior

No response

react-big-calendar version

1.20.0

React version

19.2.6

Platform/Target and Browser Versions

macOS Chrome

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions