mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Update blank state for datetime filters [SCI-6571] (#3891)
Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
parent
c097b321a7
commit
f7cc20ebab
7 changed files with 8 additions and 2 deletions
|
@ -55,6 +55,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getHours()}:${date.getMinutes()}`
|
return `${date.getHours()}:${date.getMinutes()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formattedDate(date) {
|
formattedDate(date) {
|
||||||
|
if (!date) return null
|
||||||
return `${date.getHours()}:${date.getMinutes()}`
|
return `${date.getHours()}:${date.getMinutes()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
},
|
},
|
||||||
recalcTimestamp() {
|
recalcTimestamp() {
|
||||||
let date = this.timeOnly ? new Date() : this.date;
|
let date = this.timeOnly ? new Date() : this.date;
|
||||||
if (this.isValidDate(date)) {
|
if (this.isValidDate(date) && (this.dateOnly || this.isValidTime())) {
|
||||||
if (!this.isValidTime()) {
|
if (this.dateOnly) {
|
||||||
date.setHours(0);
|
date.setHours(0);
|
||||||
date.setMinutes(0);
|
date.setMinutes(0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue