diff --git a/src/components/Calendar/hooks/useCalendarGridProps.ts b/src/components/Calendar/hooks/useCalendarGridProps.ts index 653dc92..463d2a0 100644 --- a/src/components/Calendar/hooks/useCalendarGridProps.ts +++ b/src/components/Calendar/hooks/useCalendarGridProps.ts @@ -22,26 +22,37 @@ export function useCalendarGridProps(state: CalendarState | RangeCalendarState) ...focusWithinProps, onKeyDown: (e) => { if (e.key === 'ArrowRight') { + e.preventDefault(); state.focusNextCell(); } else if (e.key === 'ArrowLeft') { + e.preventDefault(); state.focusPreviousCell(); } else if (e.key === 'ArrowDown') { + e.preventDefault(); state.focusNextRow(); } else if (e.key === 'ArrowUp') { + e.preventDefault(); state.focusPreviousRow(); } else if (e.key === 'PageDown') { + e.preventDefault(); state.focusNextPage(e.shiftKey); } else if (e.key === 'PageUp') { + e.preventDefault(); state.focusPreviousPage(e.shiftKey); } else if (e.key === 'End') { + e.preventDefault(); state.focusSectionEnd(); } else if (e.key === 'Home') { + e.preventDefault(); state.focusSectionStart(); } else if (e.code === 'Minus') { + e.preventDefault(); state.zoomOut(); } else if (e.code === 'Equal') { + e.preventDefault(); state.zoomIn(); } else if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); state.selectDate(state.focusedDate); } },