Opened 6 years ago

Last modified 5 years ago

#15094 open bug

Datepicker skips months when selecting days from ShowOtherMonths area and clicking the previous/next links

Reported by: hubwoop Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:


Selecting days from the "ShowOtherMonths range" and then pressing the previous/next links leads to unexpected behavior. The month before the previous or the month after the next month will be shown instead of the previous/next month.

Consider the following jsfiddle to reproduce the bug:

Change History (2)

comment:1 Changed 6 years ago by Scott González

Status: newopen

comment:2 Changed 5 years ago by troje888

I have managed to find a workaround for this issue. In the calendar "click.xdsoft" for each TD there is a piece of code


After the month is set with the setMonth() function the month is incorrect after the setDate() is called. The workaround is moving the setMonth() below the setDate() so it will look like this

currentTime.setMonth($'month'));//<-- month is set after

Hope this will help you out till a permanent solution is found.

Note: See TracTickets for help on using tickets.