fix(FE): ShowStartEndTime made end time 1h from start by default

This commit is contained in:
Michael 2025-03-31 19:22:08 +02:00
parent dd09b2be5f
commit 6af662e830

View file

@ -52,7 +52,7 @@ const checkTime = () => {
if (end.getTime() <= start.getTime()) {
end = new Date(start);
end.setMinutes(start.getMinutes() + 1);
end.setMinutes(start.getMinutes() + 60);
endTime.value = end.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit' });;
}
duration.value = getDuration(start, end);
@ -64,6 +64,10 @@ onMounted(() => {
if(endTime.value == '') endTime.value=startTime.value
checkTime()
});
watch([startTime, endTime], () => {
checkTime();
});
</script>
<template>
@ -89,7 +93,6 @@ onMounted(() => {
format="ampm"
ampm-in-title
full-width
v-on:update:model-value=checkTime
></v-time-picker>
</v-menu>
</v-text-field>
@ -112,7 +115,6 @@ onMounted(() => {
ampm-in-title
full-width
:min="startTime"
v-on:update:model-value=checkTime
></v-time-picker>
</v-menu>
</v-text-field>