From 0e2f4d10f75cb4bc422f19f531c6a699839b071a Mon Sep 17 00:00:00 2001 From: lesion Date: Mon, 7 Mar 2022 13:23:15 +0100 Subject: [PATCH] fix 'same day events' --- pages/add/DateInput.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/add/DateInput.vue b/pages/add/DateInput.vue index 6ba63d7f..b6d605ef 100644 --- a/pages/add/DateInput.vue +++ b/pages/add/DateInput.vue @@ -78,7 +78,7 @@ export default { todayEvents () { const start = dayjs(this.value.from).startOf('day').unix() const end = dayjs(this.value.from).endOf('day').unix() - const events = this.events.filter(e => (this.event.id && e.id !== this.event.id) && e.start_datetime >= start && e.start_datetime <= end) + const events = this.events.filter(e => e.start_datetime >= start && e.start_datetime <= end) return events }, attributes () { @@ -161,8 +161,10 @@ export default { this.type = 'normal' } this.events = await this.$api.getEvents({ - start: dayjs().unix() + start: dayjs().unix(), + show_recurrent: true }) + this.events = this.events.filter(e => e.id !== this.event.id) }, methods: { updateRecurrent (value) {