Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/web/modules/bookings/components/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useRef } from "react";
import { shallow } from "zustand/shallow";

import type { Dayjs } from "@calcom/dayjs";
Expand Down Expand Up @@ -108,7 +109,15 @@ export const DatePicker = ({
onMonthChange,
isLoading: isLoading ?? true,
});
moveToNextMonthOnNoAvailability();
const hasInitialJumpOccurred = useRef(false);

useEffect(() => {
// Only auto-jump on initial load when data is loaded
if (!isLoading && !hasInitialJumpOccurred.current) {
moveToNextMonthOnNoAvailability();
hasInitialJumpOccurred.current = true;
}
}, [isLoading]);

// Determine if this is a compact sidebar view based on layout
const isCompact = layout !== "month_view" && layout !== "mobile";
Expand Down
Loading