From f8b4b7c764b0037e689fe650009718ce6de2b67d Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 31 Oct 2024 11:10:43 +0100 Subject: [PATCH] fix: reset due date on recurring selection only if coming from multidate selection --- components/DateInput.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/DateInput.vue b/components/DateInput.vue index e7710169..6cb9290a 100644 --- a/components/DateInput.vue +++ b/components/DateInput.vue @@ -210,7 +210,11 @@ export default { if (what === 'type') { if (typeof value === 'undefined') { this.type = 'normal' } if (value === 'recurrent') { - this.$emit('input', { ...this.value, due: null, dueHour: null, recurrent: { frequency: '1w' }, multidate: false }) + if (this.value.multidate && this.value.due) { + this.$emit('input', { ...this.value, due: this.value.from, recurrent: { frequency: '1w' }, multidate: false }) + } else { + this.$emit('input', { ...this.value, recurrent: { frequency: '1w' }, multidate: false }) + } } else if (value === 'multidate') { this.$emit('input', { ...this.value, recurrent: null, multidate: true }) } else {