focus on description after starting time tracker, ST-254

This commit is contained in:
Gregor Vostrak
2024-06-18 18:28:45 +02:00
parent 0c054bdcf2
commit 0121195e75
4 changed files with 43 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { getDayJsInstance, getLocalizedDayJs } from '@/utils/time';
import { twMerge } from 'tailwind-merge';
@@ -14,6 +14,10 @@ const model = defineModel<string | null>({
const tempDate = ref(getLocalizedDayJs(model.value).format('YYYY-MM-DD'));
watch(model, (value) => {
tempDate.value = getLocalizedDayJs(value).format('YYYY-MM-DD');
});
function updateDate(event: Event) {
const target = event.target as HTMLInputElement;
const newValue = target.value;