Skip to content

[Bug] Calendar: Shift+Page Up and Shift+Page Down move a month instead of a year #8947

Closed

Description

@duytbp

Description

In Calendar (and the calendars of DateInput, DateRangeInput and DateTimeInput), Shift+Page Up and Shift+Page Down move the focused day by one month, the same as Page Up and Page Down without Shift. The APG Date Picker Dialog pattern gives them a year: "Shift + Page Up: Changes the grid of dates to the same date in the previous year", and Shift + Page Down to the next year.

useGridFocus maps PageUp/PageDown to onPageUp/onPageDown without looking at shiftKey (useGridFocus.ts:573-578), and Calendar's handlers always page by 1, 'months' (Calendar.tsx:956-969). #7467 added the month paging; the year keys were not part of it.

For a keyboard user a date a few years away (a birth date, an expiry date) takes twelve presses per year today.

Expected: Shift+Page Up and Shift+Page Down move the focused day to the same date in the previous or next year (clamped to the month's last day, and subject to min, max and dateConstraints as the month keys are).

Reproduction

import {Calendar} from '@astryxdesign/core';

export function Repro() {
  return <Calendar defaultValue="2026-06-15" />;
}
  1. Tab into the grid; Monday, June 15, 2026 has focus.
  2. Press Shift+Page Up.
  3. Focus moves to Friday, May 15, 2026 (one month back), not to Monday, June 15, 2025.

Astryx Version

@astryxdesign/[email protected], still present on main (14fc587)

Environment

Any browser; also reproduced in jsdom (fireEvent.keyDown(cell, {key: 'PageUp', shiftKey: true}) lands on May 15).

Activity

  1. added
    bug
    component
    on Nov 2, 2026
  2. added a commit that references this issue on Nov 4, 2026
    85afaa0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityarea:corebugcomponent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions