Skip to content

Arrow Navigation always starts at top-left instead of at selected date #1118

@Elaktrato

Description

@Elaktrato

Describe the bug
When having the arrow-navigation active on a datepicker instance, it will always start out at the top-left of wherever you are inside the dialog. So for example when you open a fresh dialog you start on the month and whatever arrow key you press it will go from there, meaning arrow down will lead to the first week, first or second day of the month. The same also goes for any overlays however, so when picking a year you start out at 1900 instead of for example the current year.
focus-start-date and start-date don't change this behaviour

To Reproduce
Steps to reproduce the behavior:

  1. Go to the official documentation
  2. Click on the example for the arrow navigation
  3. Try using the arrow keys to navigate the date grid or go to the year overlay and press arrow down to see your focus being set to 1903

Expected behavior
Have the arrow keys start from the current date or the model-value date, month or year, depending on the overlay.
I suppose focus-start-date and start-date should also change the starting point of the arrow navigation

Desktop & mobile (please complete the following information):

  • Browser: Chrome 135.0.7049.85
  • Using vue-datepicker version 11.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions