add workaround for issue with sorting days into yearmonths/weeks
This commit is contained in:
@ -196,6 +196,15 @@ export function organizeEventsInCalendar(
|
||||
const yearMonth = formatDate(start, "yyyy-MM");
|
||||
const week = formatDate(start, "w");
|
||||
const day = formatDate(start, "yyyy-MM-dd");
|
||||
if (!calendar[yearMonth]) {
|
||||
calendar[yearMonth] = {};
|
||||
}
|
||||
if (!calendar[yearMonth][week]) {
|
||||
calendar[yearMonth][week] = {};
|
||||
}
|
||||
if (!calendar[yearMonth][week][day]) {
|
||||
calendar[yearMonth][week][day] = [];
|
||||
}
|
||||
calendar[yearMonth][week][day].push(event);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user