From 4ca5bd58ee19bd50e1756ca683c19aeaf538a9b0 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Sun, 27 Mar 2022 20:48:13 +0100 Subject: [PATCH] Fixing Booking day name (#2297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Omar López Co-authored-by: Peer Richelsen --- apps/web/components/booking/AvailableTimes.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/components/booking/AvailableTimes.tsx b/apps/web/components/booking/AvailableTimes.tsx index 327fdb1b..f6467262 100644 --- a/apps/web/components/booking/AvailableTimes.tsx +++ b/apps/web/components/booking/AvailableTimes.tsx @@ -5,6 +5,8 @@ import Link from "next/link"; import { useRouter } from "next/router"; import React, { FC, useEffect, useState } from "react"; +import { nameOfDay } from "@calcom/lib/weekday"; + import classNames from "@lib/classNames"; import { useLocale } from "@lib/hooks/useLocale"; import { useSlots } from "@lib/hooks/useSlots"; @@ -41,7 +43,6 @@ const AvailableTimes: FC = ({ const { t, i18n } = useLocale(); const router = useRouter(); const { rescheduleUid } = router.query; - const { slots, loading, error } = useSlots({ date, slotInterval, @@ -64,7 +65,7 @@ const AvailableTimes: FC = ({
- {date.toDate().toLocaleString(i18n.language, { weekday: "long" })} + {nameOfDay(i18n.language, Number(date.format("d")))} {date.format(", D ")} {date.toDate().toLocaleString(i18n.language, { month: "long" })}