= ({
aria-labelledby={titleId}
aria-live="polite"
>
-
+
= ({
)
)
if (newState.to || !isRange) {
- setTimeout(() => handleOnClose())
+ setTimeout(() => close())
}
}}
- onKeyDown={handleDayPickerKeyDown}
initialMonth={replaceInvalidDate(from) || initialMonth}
disabledDays={disabledDays}
$isRange={isRange}
- $isVisible={open}
+ $isVisible={isOpen}
onFocus={onCalendarFocus}
onDayMouseEnter={handleDayMouseEnter}
onDayMouseLeave={handleDayMouseLeave}
onDayFocus={handleDayFocus}
/>
-
+
>
)
diff --git a/packages/react-component-library/src/components/DatePickerE/useCloseOnEscape.ts b/packages/react-component-library/src/components/DatePickerE/useCloseOnEscape.ts
deleted file mode 100644
index ee882fb2dc..0000000000
--- a/packages/react-component-library/src/components/DatePickerE/useCloseOnEscape.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { useCallback } from 'react'
-
-import { ESCAPE } from '../../utils/keyCodes'
-
-export function useCloseOnEscape(handleOnClose: () => void): {
- handleDayPickerKeyDown: React.KeyboardEventHandler