#2208·jquery-ui

Selecting next/previous month is confusing when selectOtherMonths is active

Author: jlherrenCreated Jan 23, 2024Updated Feb 11, 2026
LabelsComp: DatepickerBehavior shared with 1.12

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.