Time zone issue with multi-day events
See original GitHub issueHey!
I’ve noticed a potential issue with multi-day events when viewing from a different time zone than the one that is set for the calendar. Single-day events work correctly.
In the example below, the multi-day event should span from 10/01/2022
to 14/01/2022
. The time zone is set to Asia/Tokyo
with the Moment.js localizer.
When viewing the calendar from the Asia/Tokyo
time zone, the range is correct:
When viewing the calendar from the America/Los_Angeles
(or Europe/Brussels
) time zone, the range is 1 day short:
CodeSandbox of the demo: https://codesandbox.io/s/romantic-stonebraker-w633f?file=/src/App.js
Is this an issue with react-big-calendar
or a mistake on my end?
Thank you!
Žiga
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
All Day Calendar Events and Different Time Zones
If an all-day or multi-day meeting (using the "All day event" checkbox) is created in a different time zone, Outlook has historically ...
Read more >Use different time zones in Calendar on Mac - Apple Support
Change the time zone for an event ... Double-click the event, or force click it. Click the event's date, click the Time Zone...
Read more >Recurring events lose automatic timezone conversion
A recurring event is always relative to the sender's timezone (or rather to the event location), and not to the recipient's timezone, ...
Read more >Event time zones FAQ - Trumba Help
Yes. Event time zones work as expected with repeating and multi-day events. Back to FAQ list. Can I use bulk settings to change...
Read more >All-day calendar events suffer from timezone issue turning 1 ...
To recreate, in the UK timezone (may work in others that observe DST) create a Monday all-day event set to repeat weekly, then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a problem where month was not showing mulit-day events on Saturdays in the Month view when setting timezone to
UTC
:I did some debugging and found that the
localizer.segmentOffset === 1
caused thespan
of the event to max at 6 (https://github.com/jquense/react-big-calendar/blob/e5721ef127d407a12ac74514981b311a1558fd2b/src/utils/eventLevels.js#L28). So I manually setlocalizer.segmentOffset = 0
outside of initializing thelocalizer
and now I see the correct output:The code to do so is:
Hi is there a workaround to get this fixed in the week view or workweek view? I also experience strange behavior in the workweek view when an event overlaps a week the Friday is skipped in the allday colum. But this is not always the case. My pc is set to English and then it works fine. But when the pc is set to Dutch this behavior occurs