Refactors calendar type to calendar mode

Updates the codebase to utilize `CalendarMode` instead of the deprecated `CalendarType`.

Simplifies `CalendarConfig` by removing legacy methods and related type aliases, enhancing code maintainability and clarity.

Improves event rendering by ensuring `GRID_RENDERED` events include explicit start and end dates, preventing errors and ensuring correct data filtering.
This commit is contained in:
Janus Knudsen 2025-08-20 21:51:49 +02:00
parent 83c0ce801c
commit 0ea4e47324
10 changed files with 61 additions and 91 deletions

View file

@ -67,6 +67,16 @@ export class WeekViewStrategy implements ViewStrategy {
return this.dateCalculator.getWorkWeekDates(baseDate);
}
getPeriodRange(baseDate: Date): { startDate: Date; endDate: Date } {
const weekStart = this.dateCalculator.getISOWeekStart(baseDate);
const weekEnd = this.dateCalculator.addDays(weekStart, 6);
return {
startDate: weekStart,
endDate: weekEnd
};
}
destroy(): void {
// Clean up any week-specific resources
// For now, just log