DatePicker component keyboard navigation #1163

Closed
opened 2026-01-29 17:49:46 +00:00 by claunia · 0 comments
Owner

Originally created by @Koen-Nocore on GitHub (Mar 19, 2024).

Describe the bug
When navigating the date picker only using keyboard events, you can select a month and a year through the dropdown options. After selecting these options and proceeding with picking the day, the month and year resets to the focused day. This focused day is by default the current day and gets overridden when selecting a day with the enter key. Selecting a day with the mouse doesn't update the focused day.

To Reproduce

  1. Go to "https://blazor.radzen.com/datepicker".
  2. Tab to the first date picker component.
  3. Press Enter to open the date picker.
  4. Select a month and year through the dropdown options.
  5. Tab to the day selection.
  6. Use the arrow keys to select a day.
    ACTUAL:
  7. The input resets to the current date and proceeds to select the day from there.
    EXPECTED:
  8. The input enters on the month (maybe the first day of that month) that is selected through the dropdowns.

Expected behavior
When navigating the input through keyboard events I expect to be able to select a month and a year and select a day based on those previous selections.
When selecting a date with mouse input I expect that date to be the base from where keyboard navigation begins.
When having given a default value I expect that date to be the base from where keyboard navigation begins.

Screenshots
https://github.com/radzenhq/radzen-blazor/assets/138504855/17f69f80-0dc1-4f3d-b5eb-26701e45aa68

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome, Edge, FireFox
  • Version: latest

Additional context
Add any other context about the problem here.

Originally created by @Koen-Nocore on GitHub (Mar 19, 2024). **Describe the bug** When navigating the date picker only using keyboard events, you can select a month and a year through the dropdown options. After selecting these options and proceeding with picking the day, the month and year resets to the focused day. This focused day is by default the current day and gets overridden when selecting a day with the enter key. Selecting a day with the mouse doesn't update the focused day. **To Reproduce** 1. Go to "https://blazor.radzen.com/datepicker". 2. Tab to the first date picker component. 3. Press Enter to open the date picker. 4. Select a month and year through the dropdown options. 5. Tab to the day selection. 6. Use the arrow keys to select a day. ACTUAL: 7. The input resets to the current date and proceeds to select the day from there. EXPECTED: 7. The input enters on the month (maybe the first day of that month) that is selected through the dropdowns. **Expected behavior** When navigating the input through keyboard events I expect to be able to select a month and a year and select a day based on those previous selections. When selecting a date with mouse input I expect that date to be the base from where keyboard navigation begins. When having given a default value I expect that date to be the base from where keyboard navigation begins. **Screenshots** https://github.com/radzenhq/radzen-blazor/assets/138504855/17f69f80-0dc1-4f3d-b5eb-26701e45aa68 **Desktop (please complete the following information):** - OS: Windows 11 - Browser: Chrome, Edge, FireFox - Version: latest **Additional context** Add any other context about the problem here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1163