From d81123b5ac8a9ffc70b01967b81013be5c15384d Mon Sep 17 00:00:00 2001 From: Stefan Linke Date: Tue, 8 Mar 2022 08:41:07 +0100 Subject: [PATCH] fix: life event creation with unknown month/day (#6046) --- resources/js/components/people/lifeevent/CreateLifeEvent.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/people/lifeevent/CreateLifeEvent.vue b/resources/js/components/people/lifeevent/CreateLifeEvent.vue index 49698a9d62e..d15100f1a83 100644 --- a/resources/js/components/people/lifeevent/CreateLifeEvent.vue +++ b/resources/js/components/people/lifeevent/CreateLifeEvent.vue @@ -261,10 +261,10 @@ export default { * Same for the month. */ updateDate() { - if (this.selectedDay === 0) { + if (this.selectedDay === 0 || this.selectedDay === '0') { this.newLifeEvent.happened_at_day_unknown = true; this.newLifeEvent.happened_at = this.selectedYear + '-' + this.selectedMonth + '-01'; - } else if (this.selectedMonth === 0) { + } else if (this.selectedMonth === 0 || this.selectedMonth === '0') { this.newLifeEvent.happened_at_month_unknown = true; this.newLifeEvent.happened_at_day_unknown = true; this.newLifeEvent.happened_at = this.selectedYear + '-01-01';