Persist in localStorage

This commit is contained in:
Leo Vasanko committed 2025-08-22 20:16:39 -06:00
1 parent 407e87e0f9
commit d46aaa6106
5 files changed
+53 -7

No files matched your search

+4 -2
View File
@@ -63,7 +63,8 @@ const totalVirtualWeeks = computed(() => {
})
const initialScrollTop = computed(() => {
const targetWeekIndex = getWeekIndex(calendarStore.now) - 3
const nowDate = new Date(calendarStore.now)
const targetWeekIndex = getWeekIndex(nowDate) - 3
return (targetWeekIndex - minVirtualWeek.value) * rowHeight.value
})
@@ -76,7 +77,8 @@ const selectedDateRange = computed(() => {
})
const todayString = computed(() => {
const t = calendarStore.now
const d = new Date(calendarStore.now)
const t = d
.toLocaleDateString(undefined, { weekday: 'long', month: 'long', day: 'numeric' })
.replace(/,? /, '\n')
return t.charAt(0).toUpperCase() + t.slice(1)