From cf67edb4a6a458df411ae39c79f06dc1fb0819ff Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 2 Aug 2022 13:58:54 +0200 Subject: [PATCH] chore: don't use ref when not nessecary --- src/views/list/ListGantt.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/list/ListGantt.vue b/src/views/list/ListGantt.vue index 8b7ec59c..9902fd4b 100644 --- a/src/views/list/ListGantt.vue +++ b/src/views/list/ListGantt.vue @@ -75,9 +75,9 @@ const props = defineProps({ const showTasksWithoutDates = ref(false) const precision = ref('day') -const now = ref(new Date()) -const defaultFrom = format(new Date((new Date()).setDate(now.value.getDate() - 15)), 'yyyy-LL-dd') -const defaultTo = format(new Date((new Date()).setDate(now.value.getDate() + 55)), 'yyyy-LL-dd') +const now = new Date() +const defaultFrom = format(new Date((new Date()).setDate(now.getDate() - 15)), 'yyyy-LL-dd') +const defaultTo = format(new Date((new Date()).setDate(now.getDate() + 55)), 'yyyy-LL-dd') const range = ref(`${defaultFrom} to ${defaultTo}`) // TODO: only update once both dates are available (maybe use a watcher + refs instead?)