Skip to content

Commit

Permalink
#113 Fix onBlur for Date, DateTime and Time input (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Beceic <[email protected]>
  • Loading branch information
fbeceic and Felix Beceic authored May 4, 2023
1 parent de9e821 commit b924d0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/date/src/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default function DateInput({
numberOfMonths: 1,
onDatesChange,
});
const { opened, setOpened } = usePickerOpener(false, inputRef, datePickerRef, (onBlur = undefined));
const { opened, setOpened } = usePickerOpener(false, inputRef, datePickerRef, undefined);

const checkActiveMonthsValidity =
value &&
Expand Down
2 changes: 1 addition & 1 deletion libs/date/src/DateTimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default function DateTimeInput({
const [isDatePicker, setIsDatePicker] = React.useState<boolean>(true);
const [showTimePickerMinutes, setShowTimePickerMinutes] = React.useState(false);

const { opened, setOpened } = usePickerOpener(false, inputRef, dateTimePickerRef, onBlur);
const { opened, setOpened } = usePickerOpener(false, inputRef, dateTimePickerRef, undefined);

const isTwelveHours = type === "use12Hours";

Expand Down
2 changes: 1 addition & 1 deletion libs/date/src/TimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default function TimeInput({

const inputRef = React.useRef<HTMLInputElement>(null);
const timePickerRef = React.useRef<HTMLDivElement>(null);
const { opened, setOpened } = usePickerOpener(false, inputRef, timePickerRef, onBlur);
const { opened, setOpened } = usePickerOpener(false, inputRef, timePickerRef, undefined);
const [showTimePickerMinutes, setShowTimePickerMinutes] = React.useState(false);

const onOpen = () => {
Expand Down

0 comments on commit b924d0d

Please sign in to comment.