Fix: incorrect weekyear for events (#4519)

pull/4520/head
shamoon 3 weeks ago committed by GitHub
parent a158866ca1
commit b2158b0921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,7 +9,7 @@ const cellStyle = "relative w-10 flex items-center justify-center flex-col";
const monthButton = "pl-6 pr-6 ml-2 mr-2 hover:bg-theme-100/20 dark:hover:bg-white/5 rounded-md cursor-pointer"; const monthButton = "pl-6 pr-6 ml-2 mr-2 hover:bg-theme-100/20 dark:hover:bg-white/5 rounded-md cursor-pointer";
export function Day({ weekNumber, weekday, events, colorVariants, showDate, setShowDate, currentDate }) { export function Day({ weekNumber, weekday, events, colorVariants, showDate, setShowDate, currentDate }) {
const cellDate = showDate.set({ weekday, weekNumber }).startOf("day"); const cellDate = showDate.set({ weekday, weekNumber, weekYear: showDate.year }).startOf("day");
const filteredEvents = events?.filter((event) => compareDateTimezone(cellDate, event)); const filteredEvents = events?.filter((event) => compareDateTimezone(cellDate, event));
const dayStyles = (displayDate) => { const dayStyles = (displayDate) => {

Loading…
Cancel
Save