diff --git a/components/TempDesignSystem/Form/Date/index.tsx b/components/TempDesignSystem/Form/Date/index.tsx index 8f5e7347a..d697cff34 100644 --- a/components/TempDesignSystem/Form/Date/index.tsx +++ b/components/TempDesignSystem/Form/Date/index.tsx @@ -10,6 +10,7 @@ import { dt } from "@/lib/dt" import Select from "@/components/TempDesignSystem/Select" import { rangeArray } from "@/utils/rangeArray" +import ErrorMessage from "../ErrorMessage" import { DateName } from "./date" import styles from "./date.module.css" @@ -21,7 +22,7 @@ import type { DateProps } from "./date" export default function DateSelect({ name, registerOptions = {} }: DateProps) { const intl = useIntl() const currentValue = useWatch({ name }) - const { control, setValue, trigger } = useFormContext() + const { control, setValue, trigger, formState } = useFormContext() const { field } = useController({ control, name, @@ -204,6 +205,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) { }} + ) }