check end date being always after start date
This commit is contained in:
parent
e34f08ae39
commit
147e52b0e7
1 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,7 @@ export default defineComponent({
|
||||||
return (this.document.getMap("form").get("start") as string)?.slice(0, 16);
|
return (this.document.getMap("form").get("start") as string)?.slice(0, 16);
|
||||||
},
|
},
|
||||||
set(val: string) {
|
set(val: string) {
|
||||||
|
if (new Date(val) > new Date(this.end)) this.end = val;
|
||||||
let tmp = new Date(val + ":00.000Z").toISOString();
|
let tmp = new Date(val + ":00.000Z").toISOString();
|
||||||
this.document.getMap("form").set("start", tmp);
|
this.document.getMap("form").set("start", tmp);
|
||||||
},
|
},
|
||||||
|
@ -140,6 +141,7 @@ export default defineComponent({
|
||||||
return (this.document.getMap("form").get("end") as string)?.slice(0, 16);
|
return (this.document.getMap("form").get("end") as string)?.slice(0, 16);
|
||||||
},
|
},
|
||||||
set(val: string) {
|
set(val: string) {
|
||||||
|
if (new Date(this.start) > new Date(val)) val = this.start;
|
||||||
let tmp = new Date(val + ":00.000Z").toISOString();
|
let tmp = new Date(val + ":00.000Z").toISOString();
|
||||||
this.document.getMap("form").set("end", tmp);
|
this.document.getMap("form").set("end", tmp);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue