mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +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: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
},
|
||||
methods: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
},
|
||||
methods: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
},
|
||||
methods: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
},
|
||||
methods: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getHours()}:${date.getMinutes()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
},
|
||||
methods: {
|
||||
formattedDate(date) {
|
||||
if (!date) return null
|
||||
return `${date.getHours()}:${date.getMinutes()}`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
},
|
||||
recalcTimestamp() {
|
||||
let date = this.timeOnly ? new Date() : this.date;
|
||||
if (this.isValidDate(date)) {
|
||||
if (!this.isValidTime()) {
|
||||
if (this.isValidDate(date) && (this.dateOnly || this.isValidTime())) {
|
||||
if (this.dateOnly) {
|
||||
date.setHours(0);
|
||||
date.setMinutes(0);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue