fix: don't try to convert a null date
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Resolves #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()
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue