TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.
TypeScript graphviewkanban-boardnodejsproductivityproject-managementself-hostedtasktask-managementtask-managertodoapp
fix(web): date picker showed the wrong day and dropped the start date
Daniel Barretoee889dd47dd2
diff --git a/web/src/components/features/base/TvDateRange.vue b/web/src/components/features/base/TvDateRange.vueindex c8e59b7..327d50d 100644--- a/web/src/components/features/base/TvDateRange.vue+++ b/web/src/components/features/base/TvDateRange.vue@@ -107,7 +107,12 @@ const weekStart = useWeekStart()const { activatorUi } = useNuxtUiTaskItemStyles()const open = ref(false)-const isRange = ref(false)+// A task that already has a start date opens in range mode; in single-date mode,+// picking a day would silently drop that start date+const isRange = ref(Boolean(model.value?.start))+watch(() => model.value?.start, (start) => {+ isRange.value = Boolean(start)+})// drop the start date when switching back to single-date modewatch(isRange, (on) => {@@ -134,7 +139,8 @@ const rangeModel = computed<DateRangeValue>({})const format = (date?: CalendarDate): string =>- date ? useDateFormat(new Date(date.toString()), 'DD MMM').value : ''+ // new Date('YYYY-MM-DD') would read the day as UTC midnight, a day early west of UTC+ date ? useDateFormat(date.toDate(getLocalTimeZone()), 'DD MMM').value : ''const startLabel = computed(() => model.value?.start ? format(model.value.start) : t('deadline.startDate'))const endLabel = computed(() => {