Fixing Booking day name (#2297)
Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/2296/head
parent
b1d804405b
commit
4ca5bd58ee
|
@ -5,6 +5,8 @@ import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import React, { FC, useEffect, useState } from "react";
|
import React, { FC, useEffect, useState } from "react";
|
||||||
|
|
||||||
|
import { nameOfDay } from "@calcom/lib/weekday";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
import { useLocale } from "@lib/hooks/useLocale";
|
import { useLocale } from "@lib/hooks/useLocale";
|
||||||
import { useSlots } from "@lib/hooks/useSlots";
|
import { useSlots } from "@lib/hooks/useSlots";
|
||||||
|
@ -41,7 +43,6 @@ const AvailableTimes: FC<AvailableTimesProps> = ({
|
||||||
const { t, i18n } = useLocale();
|
const { t, i18n } = useLocale();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { rescheduleUid } = router.query;
|
const { rescheduleUid } = router.query;
|
||||||
|
|
||||||
const { slots, loading, error } = useSlots({
|
const { slots, loading, error } = useSlots({
|
||||||
date,
|
date,
|
||||||
slotInterval,
|
slotInterval,
|
||||||
|
@ -64,7 +65,7 @@ const AvailableTimes: FC<AvailableTimesProps> = ({
|
||||||
<div className="mt-8 flex flex-col text-center sm:mt-0 sm:w-1/3 sm:pl-4 md:-mb-5">
|
<div className="mt-8 flex flex-col text-center sm:mt-0 sm:w-1/3 sm:pl-4 md:-mb-5">
|
||||||
<div className="mb-4 text-left text-lg font-light text-gray-600">
|
<div className="mb-4 text-left text-lg font-light text-gray-600">
|
||||||
<span className="w-1/2 text-gray-600 dark:text-white">
|
<span className="w-1/2 text-gray-600 dark:text-white">
|
||||||
<strong>{date.toDate().toLocaleString(i18n.language, { weekday: "long" })}</strong>
|
<strong>{nameOfDay(i18n.language, Number(date.format("d")))}</strong>
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
{date.format(", D ")}
|
{date.format(", D ")}
|
||||||
{date.toDate().toLocaleString(i18n.language, { month: "long" })}
|
{date.toDate().toLocaleString(i18n.language, { month: "long" })}
|
||||||
|
|
Loading…
Reference in New Issue