Skip to content

Scheduling infrastructure for absolutely everyone.

fix: correct month after changing time zone (#5635)

Udit Takkardf91425643a1
diff --git a/packages/ui/v2/modules/booker/DatePicker.tsx b/packages/ui/v2/modules/booker/DatePicker.tsx
index f753406dbaa..0ddbcda1911 100644
--- a/packages/ui/v2/modules/booker/DatePicker.tsx
+++ b/packages/ui/v2/modules/booker/DatePicker.tsx
@@ -138,9 +138,10 @@ const DatePicker = ({
onMonthChange(browsingDate.add(newMonth, "month"));
}
};
-
const month = browsingDate
- ? new Intl.DateTimeFormat(i18n.language, { month: "long" }).format(new Date(browsingDate.toISOString()))
+ ? new Intl.DateTimeFormat(i18n.language, { month: "long" }).format(
+ new Date(browsingDate.year(), browsingDate.month())
+ )
: null;
return (