fix: error oening date override input dialog (#23182)

This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-08-19 11:00:33 +00:00
1 parent f9e24f51a7
commit af6e24f433
1 file changed
+16 -13
@@ -3,6 +3,7 @@ import { useForm } from "react-hook-form";
import type { Dayjs } from "@calcom/dayjs"; import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs"; import dayjs from "@calcom/dayjs";
import { BookerStoreProvider } from "@calcom/features/bookings/Booker/BookerStoreProvider";
import { Dialog } from "@calcom/features/components/controlled-dialog"; import { Dialog } from "@calcom/features/components/controlled-dialog";
import { yyyymmdd } from "@calcom/lib/dayjs"; import { yyyymmdd } from "@calcom/lib/dayjs";
import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -136,19 +137,21 @@ const DateOverrideForm = ({
className="p-6 sm:flex sm:p-0 xl:flex-row"> className="p-6 sm:flex sm:p-0 xl:flex-row">
<div className="sm:border-subtle w-full sm:border-r sm:p-4 sm:pr-6 md:p-8"> <div className="sm:border-subtle w-full sm:border-r sm:p-4 sm:pr-6 md:p-8">
<DialogHeader title={t("date_overrides_dialog_title")} /> <DialogHeader title={t("date_overrides_dialog_title")} />
<DatePicker <BookerStoreProvider>
excludedDates={excludedDates} <DatePicker
weekStart={weekStart} excludedDates={excludedDates}
selected={selectedDates} weekStart={weekStart}
onChange={(day) => { selected={selectedDates}
if (day) onDateChange(day); onChange={(day) => {
}} if (day) onDateChange(day);
onMonthChange={(newMonth) => { }}
setBrowsingDate(newMonth); onMonthChange={(newMonth) => {
}} setBrowsingDate(newMonth);
browsingDate={browsingDate} }}
locale={isLocaleReady ? i18n.language : "en"} browsingDate={browsingDate}
/> locale={isLocaleReady ? i18n.language : "en"}
/>
</BookerStoreProvider>
</div> </div>
<div className="relative mt-8 flex w-full flex-col sm:mt-0 sm:p-4 md:p-8"> <div className="relative mt-8 flex w-full flex-col sm:mt-0 sm:p-4 md:p-8">
{selectedDates[0] ? ( {selectedDates[0] ? (