fix: don't try to convert a null date
continuous-integration/drone/push Build is passing Details

Resolves #3371
This commit is contained in:
kolaente 2023-05-31 15:07:23 +02:00
parent 244da46e38
commit 4ba02ebbb6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 1 deletions

View File

@ -158,7 +158,12 @@ const flatPickerConfig = computed(() => ({
// Since flatpickr dates are strings, we need to convert them to native date objects.
// To make that work, we need a separate variable since flatpickr does not have a change event.
const flatPickrDate = computed({
set(newValue: string | Date) {
set(newValue: string | Date | null) {
if (newValue === null) {
date.value = null
return
}
date.value = createDateFromString(newValue)
updateData()
},