diff --git a/apps/app/components/cycles/form.tsx b/apps/app/components/cycles/form.tsx index d32fd047d..863b9b57a 100644 --- a/apps/app/components/cycles/form.tsx +++ b/apps/app/components/cycles/form.tsx @@ -22,9 +22,8 @@ type Props = { const defaultValues: Partial = { name: "", description: "", - status: "draft", - start_date: "", - end_date: "", + start_date: null, + end_date: null, }; export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, status, data }) => { @@ -77,7 +76,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat const checkEmptyDate = (watch("start_date") === "" && watch("end_date") === "") || - (watch("start_date") === null && watch("end_date") === null); + (!watch("start_date") && !watch("end_date")); useEffect(() => { reset({