diff --git a/src/components/Datetime.vue b/src/components/Datetime.vue index e84c877b..3e551659 100644 --- a/src/components/Datetime.vue +++ b/src/components/Datetime.vue @@ -14,12 +14,23 @@ dayjs.extend(relativeTime) export default { props: { value: String, + dateOnly: { + type: Boolean, + default: false, + }, }, computed: { displayText() { - let format = "YYYY-MM-DD HH:mm:ss"; - return dayjs.utc(this.value).tz(this.$root.timezone).format(format) + if (this.value !== undefined && this.value !== "") { + let format = "YYYY-MM-DD HH:mm:ss"; + if (this.dateOnly) { + format = "YYYY-MM-DD"; + } + return dayjs.utc(this.value).tz(this.$root.timezone).format(format); + } else { + return ""; + } }, } } diff --git a/src/pages/Details.vue b/src/pages/Details.vue index 6d93df39..cc447bf4 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -51,10 +51,18 @@
(30-day)