Skip to content

Commit

Permalink
Fix multiday conferences showing in wrong month (#1319)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhens authored Jan 22, 2025
1 parent 353b474 commit 9cc48c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions page/src/app.hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export const useDayEvents = (monthEvents, day = null) => {
result = result.filter((e) => {
let retval = false

if (e.date[0]) {
if (e.date[0] && e.date[1] == null) {
const startDate = new Date(e.date[0])
retval = startDate.getDate() === filterDay.getDate()
}

if (e.date[1]) {
if (e.date[1] && e.date[0] == null) {
const endDate = new Date(e.date[1])
retval = retval || endDate.getDate() === filterDay.getDate()
}
Expand Down
2 changes: 1 addition & 1 deletion page/src/components/CalendarGrid/CalendarGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CalendarGrid = ({year}) => {
const days = [];
const nbDays = new Date(year, m + 1, 0).getDate();
for (let i = 1; i <= nbDays; i++) {
days.push(new Date(year, m, i));
days.push(new Date(Date.UTC(year, m, i)));
}
months.push({month: m, days});
}
Expand Down

0 comments on commit 9cc48c1

Please sign in to comment.