This commit is contained in:
les
2021-05-08 11:47:56 +02:00
parent 321b9ea134
commit d8eabbdbe2

View File

@@ -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