Skip to main content

Search and Top Navigation

#15094 open bug ()

Opened November 10, 2016 10:23AM UTC

Last modified April 20, 2018 08:21AM UTC

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:

Attachments (0)
Change History (2)

Changed November 10, 2016 06:49PM UTC by scottgonzalez comment:1

status: newopen

Changed April 20, 2018 08:21AM UTC by troje888 comment:2

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.