cleanup
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user