Skip to content

Commit

Permalink
fix(date-picker): add type single to condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore committed Oct 7, 2024
1 parent fdf78b6 commit c3ee37e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react/src/components/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,11 @@ const DatePicker = React.forwardRef(function DatePicker(
}

function handleKeyPress(event) {
if (match(event, keys.Enter) && closeOnSelect) {
if (
match(event, keys.Enter) &&
closeOnSelect &&
datePickerType == 'single'
) {
calendar.calendarContainer.classList.remove('open');
}
}
Expand Down

0 comments on commit c3ee37e

Please sign in to comment.