jquery / jquery/jquery-ui

Selecting next/previous month is confusing when selectOtherMonths is active

Open
#2,208 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Behavior shared with 1.12 Comp: Datepicker
Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

When selectOtherMonths is active and a day from another month is selected, the "Previous month" and "Next month" buttons behave in a confusing way, where they skip over a month (or do nothing when going the other way).

Reproduction example: https://jsfiddle.net/wb43muyz/

Steps to reproduce:

  1. Select Feb 1 (at the bottom, don't use the next month buttons).
  2. Click on the "Next month" button.
  3. You have now jumped from January to March.

It would be less confusing if the next/previous buttons would take the currently shown month as basis, instead of the currently selected date.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in the linked jsfiddle with selectOtherMonths enabled, following the listed February 1 and Next month steps. Trace the datepicker's Previous month and Next month navigation to compare the displayed month with the selected date. Done means both buttons move one month from the currently shown month without skipping or doing nothing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.