diff --git a/packages/ui/v2/modules/booker/DatePicker.tsx b/packages/ui/v2/modules/booker/DatePicker.tsx index 3f24ae32c7..f753406dba 100644 --- a/packages/ui/v2/modules/booker/DatePicker.tsx +++ b/packages/ui/v2/modules/booker/DatePicker.tsx @@ -4,6 +4,7 @@ import dayjs, { Dayjs } from "@calcom/dayjs"; import { useEmbedStyles } from "@calcom/embed-core/embed-iframe"; import classNames from "@calcom/lib/classNames"; import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns"; +import { useLocale } from "@calcom/lib/hooks/useLocale"; import { weekdayNames } from "@calcom/lib/weekday"; import { SkeletonText } from "@calcom/ui/v2"; @@ -130,6 +131,7 @@ const DatePicker = ({ ...passThroughProps }: DatePickerProps & Partial>) => { const browsingDate = passThroughProps.browsingDate || dayjs().startOf("month"); + const { i18n } = useLocale(); const changeMonth = (newMonth: number) => { if (onMonthChange) { @@ -137,15 +139,17 @@ const DatePicker = ({ } }; + const month = browsingDate + ? new Intl.DateTimeFormat(i18n.language, { month: "long" }).format(new Date(browsingDate.toISOString())) + : null; + return (
{browsingDate ? ( <> - - {browsingDate.format("MMMM")} - {" "} + {month}{" "} {browsingDate.format("YYYY")} ) : (