fix: DatePicker to display the correct available hours (#2686)
parent
71e67b50b2
commit
26e46ff06c
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue