fix: DatePicker to display the correct available hours (#2686)

pull/2562/head
iamkun 2022-05-06 02:51:22 +08:00 committed by GitHub
parent 71e67b50b2
commit 26e46ff06c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { ExclamationIcon } from "@heroicons/react/solid"; import { ExclamationIcon } from "@heroicons/react/solid";
import { SchedulingType } from "@prisma/client"; import { SchedulingType } from "@prisma/client";
import { Dayjs } from "dayjs"; import dayjs, { Dayjs } from "dayjs";
import Link from "next/link"; 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";
@ -8,6 +8,7 @@ import React, { FC, useEffect, useState } from "react";
import { nameOfDay } from "@calcom/lib/weekday"; import { nameOfDay } from "@calcom/lib/weekday";
import classNames from "@lib/classNames"; import classNames from "@lib/classNames";
import { timeZone } from "@lib/clock";
import { useLocale } from "@lib/hooks/useLocale"; import { useLocale } from "@lib/hooks/useLocale";
import { useSlots } from "@lib/hooks/useSlots"; import { useSlots } from "@lib/hooks/useSlots";
@ -109,7 +110,7 @@ const AvailableTimes: FC<AvailableTimesProps> = ({
brand === "#fff" || brand === "#ffffff" ? "border-brandcontrast" : "border-brand" brand === "#fff" || brand === "#ffffff" ? "border-brandcontrast" : "border-brand"
)} )}
data-testid="time"> data-testid="time">
{slot.time.format(timeFormat)} {dayjs.tz(slot.time, timeZone()).format(timeFormat)}
</a> </a>
</Link> </Link>
</div> </div>