diff --git a/src/apps/onboarding/src/components/modal-add-work/index.tsx b/src/apps/onboarding/src/components/modal-add-work/index.tsx index 970b3acc5..fc57b5ee7 100644 --- a/src/apps/onboarding/src/components/modal-add-work/index.tsx +++ b/src/apps/onboarding/src/components/modal-add-work/index.tsx @@ -172,7 +172,7 @@ const ModalAddWork: FC = (props: ModalAddWorkProps) => { dirty /> -
+
diff --git a/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx b/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx index f52fd6b66..563e76f0a 100644 --- a/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx +++ b/src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx @@ -106,7 +106,14 @@ const InputDatePicker: FC = (props: InputDatePickerProps) | undefined, + ) => { + event?.stopPropagation() + event?.preventDefault() + props.onChange?.(date) + }} placeholderText={props.placeholder || 'Select a date'} className={styles.datePickerWrapper} minDate={props.minDate} diff --git a/src/libs/ui/lib/components/form/form-groups/form-input/input-select/InputSelect.tsx b/src/libs/ui/lib/components/form/form-groups/form-input/input-select/InputSelect.tsx index 1b331f81c..09525fe57 100644 --- a/src/libs/ui/lib/components/form/form-groups/form-input/input-select/InputSelect.tsx +++ b/src/libs/ui/lib/components/form/form-groups/form-input/input-select/InputSelect.tsx @@ -2,6 +2,7 @@ import { ChangeEvent, Dispatch, FC, + MouseEvent, MutableRefObject, ReactNode, SetStateAction, @@ -49,7 +50,12 @@ const InputSelect: FC = (props: InputSelectProps) => { const toggleMenu: () => void = () => setMenuIsVisible(wasVisible => !wasVisible) - const select: (option: InputSelectOption) => () => void = (option: InputSelectOption) => () => { + const select: (option: InputSelectOption) => (event: MouseEvent) => void + = (option: InputSelectOption) => ( + event: MouseEvent, + ) => { + event.stopPropagation() + event.preventDefault() props.onChange({ target: { value: option.value }, } as unknown as ChangeEvent)