diff --git a/apps/app/components/cycles/form.tsx b/apps/app/components/cycles/form.tsx index 8ab61acc5..1a1632648 100644 --- a/apps/app/components/cycles/form.tsx +++ b/apps/app/components/cycles/form.tsx @@ -56,8 +56,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat }; const cycleStatus = - data?.start_date && data?.end_date - ? getDateRangeStatus(data?.start_date, data?.end_date) : ""; + data?.start_date && data?.end_date ? getDateRangeStatus(data?.start_date, data?.end_date) : ""; const dateChecker = async (payload: any) => { await cyclesService @@ -141,7 +140,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat value={value} onChange={(val) => { onChange(val); - watch("end_date") && cycleStatus != "current" + val && watch("end_date") && cycleStatus != "current" ? dateChecker({ start_date: val, end_date: watch("end_date"), @@ -169,7 +168,7 @@ export const CycleForm: React.FC = ({ handleFormSubmit, handleClose, stat value={value} onChange={(val) => { onChange(val); - watch("start_date") && cycleStatus != "current" + val && watch("start_date") && cycleStatus != "current" ? dateChecker({ start_date: watch("start_date"), end_date: val,