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:
- Select Feb 1 (at the bottom, don't use the next month buttons).
- Click on the "Next month" button.
- 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.
Source: jquery/jquery-ui