File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
apps/profiles/src/member-profile/education-and-certifications/ModifyEducationModal
libs/ui/lib/components/form/form-groups/form-input/input-date-picker Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ const ModifyEducationModal: FC<ModifyEducationModalProps> = (props: ModifyEducat
258258 disabled = { false }
259259 error = { formErrors . endDate }
260260 dirty
261- maxDate = { new Date ( ) }
261+ showMonthPicker = { false }
262262 showYearPicker
263263 dateFormat = 'yyyy'
264264 />
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ interface InputDatePickerProps {
2727 readonly minDate ?: Date | null | undefined ;
2828 readonly minTime ?: Date | undefined ;
2929 readonly placeholder ?: string
30+ readonly showMonthPicker ?: boolean
3031 readonly showYearPicker ?: boolean
3132 readonly tabIndex ?: number
3233}
@@ -63,16 +64,20 @@ const InputDatePicker: FC<InputDatePickerProps> = (props: InputDatePickerProps)
6364 < IconOutline . ArrowCircleLeftIcon />
6465 </ button >
6566
66- < select
67- value = { months [ getMonth ( date ) ] }
68- onChange = { ( { target : { value } } : any ) => changeMonth ( months . indexOf ( value ) ) }
69- >
70- { months . map ( option => (
71- < option key = { option } value = { option } >
72- { option }
73- </ option >
74- ) ) }
75- </ select >
67+ {
68+ props . showMonthPicker !== false && (
69+ < select
70+ value = { months [ getMonth ( date ) ] }
71+ onChange = { ( { target : { value } } : any ) => changeMonth ( months . indexOf ( value ) ) }
72+ >
73+ { months . map ( option => (
74+ < option key = { option } value = { option } >
75+ { option }
76+ </ option >
77+ ) ) }
78+ </ select >
79+ )
80+ }
7681
7782 < select
7883 value = { getYear ( date ) }
You can’t perform that action at this time.
0 commit comments