#1993·jquery-ui

datepicker - previous button with multiple months and maxDate

Author: viktorviCreated Oct 8, 2021Updated Feb 3, 2026
LabelsBugComp: DatepickerBehavior shared with 1.12

When showing multiple months and the current month is not displayed first (e.g. because of maxDate: 0), the user needs to click the previous button multiple times in order to see any effect.

In this example 3 clicks are needed https://jsfiddle.net/m3528fdb/, which makes the button seem broken initially. The number of required clicks depends on the values for stepMonths and maxDate.