mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
Fix dates off in UI
This commit is contained in:
parent
45a34ceb35
commit
fdcacb10c0
2 changed files with 76 additions and 16274 deletions
16343
frontend/package-lock.json
generated
16343
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -136,12 +136,15 @@ export default {
|
||||||
return this.$store.getters.getCurrentGroup;
|
return this.$store.getters.getCurrentGroup;
|
||||||
},
|
},
|
||||||
actualStartDate() {
|
actualStartDate() {
|
||||||
return Date.parse(this.startDate);
|
if (!this.startDate) return null;
|
||||||
|
return Date.parse(this.startDate.replaceAll("-", "/"));
|
||||||
},
|
},
|
||||||
actualEndDate() {
|
actualEndDate() {
|
||||||
return Date.parse(this.endDate);
|
if (!this.endDate) return null;
|
||||||
|
return Date.parse(this.endDate.replaceAll("-", "/"));
|
||||||
},
|
},
|
||||||
dateDif() {
|
dateDif() {
|
||||||
|
if (!this.actualEndDate || !this.actualStartDate) return null;
|
||||||
let dateDif = (this.actualEndDate - this.actualStartDate) / (1000 * 3600 * 24) + 1;
|
let dateDif = (this.actualEndDate - this.actualStartDate) / (1000 * 3600 * 24) + 1;
|
||||||
if (dateDif < 1) {
|
if (dateDif < 1) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue