mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-30 11:19:12 +01:00
fix(calendar): some timezones result in offset of one day (#3120)
This commit is contained in:
@@ -124,9 +124,13 @@ const CalendarBase = ({ isEditMode, events, month, setMonth, options }: Calendar
|
||||
)?.date,
|
||||
}))
|
||||
.filter((event): event is CalendarEvent => Boolean(event.date));
|
||||
|
||||
return (
|
||||
<CalendarDay
|
||||
date={new Date(tileDate)}
|
||||
// new Date() does not work here, because for timezones like UTC-7 it will
|
||||
// show one day earlier (probably due to the time being set to 00:00)
|
||||
// see https://github.com/homarr-labs/homarr/pull/3120
|
||||
date={dayjs(tileDate).toDate()}
|
||||
events={eventsForDate}
|
||||
disabled={isEditMode || eventsForDate.length === 0}
|
||||
rootWidth={width}
|
||||
|
||||
Reference in New Issue
Block a user