Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const ModalAddWork: FC<ModalAddWorkProps> = (props: ModalAddWorkProps) => {
dirty
/>
</div>
<div className='d-flex gap-16 full-width'>
<div className='d-flex gap-16 full-width flex-wrap'>
<div
className='flex-1'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ const InputDatePicker: FC<InputDatePickerProps> = (props: InputDatePickerProps)
<DatePicker
renderCustomHeader={renderCustomHeader}
selected={props.date}
onChange={props.onChange}
onChange={(
date: Date | null,
event: React.SyntheticEvent<any> | undefined,
) => {
event?.stopPropagation()
event?.preventDefault()
props.onChange?.(date)
}}
placeholderText={props.placeholder || 'Select a date'}
className={styles.datePickerWrapper}
minDate={props.minDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ChangeEvent,
Dispatch,
FC,
MouseEvent,
MutableRefObject,
ReactNode,
SetStateAction,
Expand Down Expand Up @@ -49,7 +50,12 @@ const InputSelect: FC<InputSelectProps> = (props: InputSelectProps) => {

const toggleMenu: () => void = () => setMenuIsVisible(wasVisible => !wasVisible)

const select: (option: InputSelectOption) => () => void = (option: InputSelectOption) => () => {
const select: (option: InputSelectOption) => (event: MouseEvent<HTMLDivElement>) => void
= (option: InputSelectOption) => (
event: MouseEvent<HTMLDivElement>,
) => {
event.stopPropagation()
event.preventDefault()
props.onChange({
target: { value: option.value },
} as unknown as ChangeEvent<HTMLInputElement>)
Expand Down