forked from mirrors/homebox
fix: add custom action for fixing broken date/times (#268)
This commit is contained in:
parent
bd933af874
commit
ce2fc7712a
11 changed files with 240 additions and 59 deletions
|
@ -31,7 +31,11 @@
|
|||
const selected = computed({
|
||||
get() {
|
||||
// return modelValue as string as YYYY-MM-DD or null
|
||||
return props.modelValue ? props.modelValue.toISOString().split("T")[0] : null;
|
||||
if (validDate(props.modelValue)) {
|
||||
return props.modelValue ? props.modelValue.toISOString().split("T")[0] : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
set(value: string | null) {
|
||||
// emit update:modelValue with a Date object or null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue