diff --git a/src/components/DaysList.vue b/src/components/DaysList.vue index 4c8be9b..bda29fe 100644 --- a/src/components/DaysList.vue +++ b/src/components/DaysList.vue @@ -7,7 +7,7 @@ defineProps<{ items: Date[] }>() diff --git a/src/stores/times.ts b/src/stores/times.ts index f08ddc4..4a816a7 100644 --- a/src/stores/times.ts +++ b/src/stores/times.ts @@ -33,6 +33,14 @@ export const useTimesStore = defineStore('times', () => { } } + days.sort() + + const today = new Date(currentTime.value.getFullYear(), currentTime.value.getMonth(), currentTime.value.getDate()) + + if (!isSameDay(days[0], today)) { + days.unshift(today) + } + return days })