Fix RTL handling, holiday names direction and UI details for full page RTL.

This commit is contained in:
Leo Vasanko
2025-08-26 09:09:32 -06:00
parent 9e3f7ddd57
commit 5752855f52
4 changed files with 88 additions and 55 deletions

View File

@@ -371,6 +371,28 @@ export function createVirtualWeekManager({
}
}
// Refresh holiday data for currently visible weeks without rebuilding structure
function refreshHolidays(reason = 'holidays-refresh') {
if (!visibleWeeks.value.length) return
const enabled = calendarStore.config.holidays.enabled
if (enabled) calendarStore._ensureHolidaysInitialized?.()
for (const week of visibleWeeks.value) {
for (const day of week.days) {
if (enabled) {
const holiday = getHolidayForDate(day.date)
;((day.holiday = holiday), (day.isHoliday = holiday !== null))
} else {
day.holiday = null
day.isHoliday = false
}
}
}
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.debug('[VirtualWeeks] refreshHolidays', reason, { weeks: visibleWeeks.value.length })
}
}
function goToToday() {
const top = addDays(new Date(calendarStore.now), -21)
const targetWeekIndex = getWeekIndex(top)
@@ -391,6 +413,7 @@ export function createVirtualWeekManager({
resetWeeks,
updateVisibleWeeks,
refreshEvents,
refreshHolidays,
getWeekIndex,
getFirstDayForVirtualWeek,
goToToday,