fix: don't try to convert a null date
Resolves https://kolaente.dev/vikunja/frontend/issues/3371
This commit is contained in:
parent
244da46e38
commit
4ba02ebbb6
@ -158,7 +158,12 @@ const flatPickerConfig = computed(() => ({
|
|||||||
// Since flatpickr dates are strings, we need to convert them to native date objects.
|
// 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.
|
// To make that work, we need a separate variable since flatpickr does not have a change event.
|
||||||
const flatPickrDate = computed({
|
const flatPickrDate = computed({
|
||||||
set(newValue: string | Date) {
|
set(newValue: string | Date | null) {
|
||||||
|
if (newValue === null) {
|
||||||
|
date.value = null
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
date.value = createDateFromString(newValue)
|
date.value = createDateFromString(newValue)
|
||||||
updateData()
|
updateData()
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user