Fix dates off in UI

This commit is contained in:
hay-kot 2021-05-31 17:20:02 -08:00
commit fdcacb10c0
2 changed files with 76 additions and 16274 deletions

16343
frontend/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -136,12 +136,15 @@ export default {
return this.$store.getters.getCurrentGroup;
},
actualStartDate() {
return Date.parse(this.startDate);
if (!this.startDate) return null;
return Date.parse(this.startDate.replaceAll("-", "/"));
},
actualEndDate() {
return Date.parse(this.endDate);
if (!this.endDate) return null;
return Date.parse(this.endDate.replaceAll("-", "/"));
},
dateDif() {
if (!this.actualEndDate || !this.actualStartDate) return null;
let dateDif = (this.actualEndDate - this.actualStartDate) / (1000 * 3600 * 24) + 1;
if (dateDif < 1) {
return null;