import clsx from "clsx"; import { Button, Calendar, CalendarCell, CalendarGrid, DateInput, type DatePickerProps, DateSegment, type DateValue, Dialog, Group, Heading, Popover, DatePicker as ReactAriaDatePicker, } from "react-aria-components"; import { type FormFieldSize, formFieldSizeToClassName, } from "../form/form-utils"; import { ArrowLeftIcon } from "../icons/ArrowLeft"; import { ArrowRightIcon } from "../icons/ArrowRight"; import { CalendarIcon } from "../icons/Calendar"; import { SendouFieldError } from "./FieldError"; import { SendouFieldMessage } from "./FieldMessage"; import { SendouLabel } from "./Label"; interface SendouDatePickerProps extends DatePickerProps { label: string; bottomText?: string; errorText?: string; size?: FormFieldSize; } export function SendouDatePicker({ label, errorText, bottomText, size, isRequired, ...rest }: SendouDatePickerProps) { return ( {label} {(segment) => } {errorText && {errorText}} {bottomText && !errorText ? ( {bottomText} ) : null}
{(date) => { return ( ); }}
); }