mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-02 15:50:27 +00:00
zero out times
This commit is contained in:
parent
171ecc3f0c
commit
8b8d7ff905
1 changed files with 7 additions and 2 deletions
|
@ -72,9 +72,14 @@
|
|||
return null;
|
||||
},
|
||||
set(value: Date | null) {
|
||||
// emit update:modelValue with a Date object or null
|
||||
console.debug("DatePicker: SET", value);
|
||||
emit("update:modelValue", value ? new Date(value) : null);
|
||||
if (value instanceof Date) {
|
||||
value = datelib.zeroTime(value);
|
||||
emit("update:modelValue", value);
|
||||
} else {
|
||||
value = value ? datelib.zeroTime(new Date(value)) : null;
|
||||
emit("update:modelValue", value);
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue