File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/apps/profiles/src/member-profile/work-expirence/ModifyWorkExpirenceModal Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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'
You can’t perform that action at this time.
0 commit comments