Fix RTL handling, holiday names direction and UI details for full page RTL.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user