fix date syncing and transfer

This commit is contained in:
Julian Krauser 2025-03-08 14:43:37 +01:00
parent 01ec3c0382
commit 4e35434591

View file

@ -128,18 +128,20 @@ export default defineComponent({
},
start: {
get() {
return this.document.getMap("form").get("start") as string;
return (this.document.getMap("form").get("start") as string)?.slice(0, 16);
},
set(val: string) {
this.document.getMap("form").set("start", val);
let tmp = new Date(val + ":00.000Z").toISOString();
this.document.getMap("form").set("start", tmp);
},
},
end: {
get() {
return this.document.getMap("form").get("end") as string;
return (this.document.getMap("form").get("end") as string)?.slice(0, 16);
},
set(val: string) {
this.document.getMap("form").set("end", val);
let tmp = new Date(val + ":00.000Z").toISOString();
this.document.getMap("form").set("end", tmp);
},
},
duration() {