Skip to content

Commit 9ce6071

Browse files
committed
MP-177 date issues fix
1 parent 49400eb commit 9ce6071

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/apps/profiles/src/member-profile/work-expirence/ModifyWorkExpirenceModal/ModifyWorkExpirenceModal.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ const ModifyWorkExpirenceModal: FC<ModifyWorkExpirenceModalProps> = (props: Modi
130130
return
131131
}
132132

133+
if (formValues.endDate && formValues.startDate && formValues.endDate <= formValues.startDate) {
134+
setFormErrors({
135+
endDate: 'End date must be greater than start date',
136+
})
137+
return
138+
}
139+
133140
const updatedWorkExpirence: UserTrait = {
134141
cityTown: formValues.city,
135142
company: formValues.company,
@@ -293,6 +300,7 @@ const ModifyWorkExpirenceModal: FC<ModifyWorkExpirenceModalProps> = (props: Modi
293300
disabled={false}
294301
error={formErrors.startDate}
295302
dirty
303+
maxDate={new Date()}
296304
/>
297305
<InputDatePicker
298306
label='End Date'

0 commit comments

Comments
 (0)