|
|
@@ -242,18 +242,18 @@ const ProjectClientDetails: React.FC<Props> = ({ |
|
|
|
// (acc, wn) => ({ ...acc, [wn.id]: wn.name }), |
|
|
|
// {}, |
|
|
|
// ); |
|
|
|
const planStart = getValues("projectPlanStart") |
|
|
|
const planEnd = getValues("projectPlanEnd") |
|
|
|
const planStart = watch("projectPlanStart") |
|
|
|
const planEnd = watch("projectPlanEnd") |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
let hasErrors = false |
|
|
|
if( |
|
|
|
!planStart || planStart > planEnd |
|
|
|
!planStart || new Date(planStart) > new Date(planEnd) |
|
|
|
){ |
|
|
|
hasErrors = true; |
|
|
|
} |
|
|
|
if( |
|
|
|
!planEnd || planStart > planEnd |
|
|
|
!planEnd || new Date(planStart) > new Date(planEnd) |
|
|
|
){ |
|
|
|
hasErrors = true; |
|
|
|
} |
|
|
|