fix: initialize date ref with null instead of undefined in Datepicker.vue

This commit is contained in:
kolaente 2025-11-22 15:03:37 +01:00
parent 3742234540
commit 508f91a97b
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
:disabled="disabled || undefined"
@click.stop="toggleDatePopup"
>
{{ date === null || date === undefined ? chooseDateLabel : formatDisplayDate(date) }}
{{ date === null ? chooseDateLabel : formatDisplayDate(date) }}
</SimpleButton>
<CustomTransition name="fade">
@ -15,7 +15,7 @@
class="datepicker-popup"
>
<DatepickerInline
v-model="date ?? null"
v-model="date"
@update:modelValue="updateData"
/>
@ -62,7 +62,7 @@ const emit = defineEmits<{
'closeOnChange': [value: boolean],
}>()
const date = ref<Date | null>()
const date = ref<Date | null>(null)
const show = ref(false)
const changed = ref(false)