import React from "react"; import dayjs from "@calcom/dayjs"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; type Props = { days: dayjs.Dayjs[]; containerNavRef: React.RefObject; }; export function DateValues({ days, containerNavRef }: Props) { const { i18n } = useLocale(); const formatDate = (date: dayjs.Dayjs): string => { return new Intl.DateTimeFormat(i18n.language, { weekday: "short" }).format(date.toDate()); }; return (
{days.map((day) => { const isToday = dayjs().isSame(day, "day"); return ( ); })}
{days.map((day) => { const isToday = dayjs().isSame(day, "day"); return (
{formatDate(day)}{" "} {day.format("DD")}
); })}
); }