From bbdd191bab9d53e1bdd9cbb9451dad279144c7dd Mon Sep 17 00:00:00 2001 From: himaniraghav3 Date: Wed, 22 Oct 2025 16:08:17 +0530 Subject: [PATCH 1/2] PM-2439 Fix year selection in form --- .../ModifyEducationModal.tsx | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx index da8498e3a..6bf9d25c0 100644 --- a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx +++ b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx @@ -39,10 +39,10 @@ const ModifyEducationModal: FC = (props: ModifyEducat = useState(props.education?.length === 0 || false) const [formValues, setFormValues]: [ - { [key: string]: string | boolean | Date | undefined }, - Dispatch> + { [key: string]: string | boolean | Date | number | undefined }, + Dispatch> ] - = useState<{ [key: string]: string | boolean | Date | undefined }>({}) + = useState<{ [key: string]: string | boolean | Date | number | undefined }>({}) const [formErrors, setFormErrors]: [ { [key: string]: string }, @@ -91,9 +91,14 @@ const ModifyEducationModal: FC = (props: ModifyEducat } function handleFormValueChange(key: string, event: React.ChangeEvent): void { + + const value = key === 'endYear' + ? Number(event.target.value) + : event.target.value + setFormValues({ ...formValues, - [key]: event.target.value, + [key]: value, }) } @@ -266,12 +271,12 @@ const ModifyEducationModal: FC = (props: ModifyEducat /> From 69a7641064fdd0c8ef05a680eae63d352d329fbb Mon Sep 17 00:00:00 2001 From: himaniraghav3 Date: Wed, 22 Oct 2025 17:20:50 +0530 Subject: [PATCH 2/2] Remove typo --- .../ModifyEducationModal/ModifyEducationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx index 6bf9d25c0..0556519c4 100644 --- a/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx +++ b/src/apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal/ModifyEducationModal.tsx @@ -276,7 +276,7 @@ const ModifyEducationModal: FC = (props: ModifyEducat dirty error={formErrors.endYear} name='endYear' - label='End Year or Expected hhhh' + label='End Year or Expected' placeholder='Select a year' tabIndex={0} />