diff --git a/pages/index.vue b/pages/index.vue index 413c1048..07b669d9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -104,7 +104,7 @@ export default { const max = dayjs(this.selectedDay).endOf('day').unix() return this.filteredEvents.filter(e => (e.start_datetime < max && e.start_datetime > min)) } else if (this.isCurrentMonth) { - return this.filteredEvents.filter(e => e.start_datetime >= now) + return this.filteredEvents.filter(e => e.end_datetime ? e.end_datetime > now : e.start_datetime + 2 * 60 * 60 > now) } else { return this.filteredEvents } @@ -155,7 +155,7 @@ export default { // check if current month is selected if (month - 1 === dayjs().month() && year === dayjs().year()) { this.isCurrentMonth = true - this.start = dayjs().unix() + this.start = dayjs().startOf('month').unix() this.date = dayjs().format('YYYY-MM-DD') } else { this.isCurrentMonth = false