This commit is contained in:
2025-10-17 00:50:03 +01:00
parent 1d55d2643d
commit bddd4cbae0
+2 -7
View File
@@ -114,18 +114,13 @@
// Create CalendarDate objects // Create CalendarDate objects
const minDate = new CalendarDate(today.getFullYear(), today.getMonth() + 1, today.getDate()); const minDate = new CalendarDate(today.getFullYear(), today.getMonth() + 1, today.getDate());
const tomorrowDate = new CalendarDate(
tomorrow.getFullYear(),
tomorrow.getMonth() + 1,
tomorrow.getDate()
);
const maxCalendarDate = new CalendarDate( const maxCalendarDate = new CalendarDate(
maxDate.getFullYear(), maxDate.getFullYear(),
maxDate.getMonth() + 1, maxDate.getMonth() + 1,
maxDate.getDate() maxDate.getDate()
); );
let placeholder = $state<CalendarDate>(tomorrowDate); let placeholder = $state<CalendarDate>(minDate);
$effect(() => { $effect(() => {
const monthKey = `${placeholder.year}-${String(placeholder.month).padStart(2, '0')}`; const monthKey = `${placeholder.year}-${String(placeholder.month).padStart(2, '0')}`;
@@ -308,7 +303,7 @@
} }
// Initialize with current month // Initialize with current month
fetchHoursForMonth(tomorrowDate); fetchHoursForMonth(minDate);
// Check if date is unavailable // Check if date is unavailable
function isDateUnavailable(date: DateValue): boolean { function isDateUnavailable(date: DateValue): boolean {