chore: add missing type to watch
This commit is contained in:
@@ -32,7 +32,7 @@ export default function FormContent({
|
|||||||
formState: { errors },
|
formState: { errors },
|
||||||
} = useFormContext<BookingWidgetSchema>()
|
} = useFormContext<BookingWidgetSchema>()
|
||||||
|
|
||||||
const selectedDate = useWatch({ name: "date" })
|
const selectedDate = useWatch<BookingWidgetSchema, "date">({ name: "date" })
|
||||||
|
|
||||||
const nights = dt(selectedDate.toDate).diff(dt(selectedDate.fromDate), "days")
|
const nights = dt(selectedDate.toDate).diff(dt(selectedDate.fromDate), "days")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user