Opened 8 years ago

Closed 7 years ago

#7782 closed bug (duplicate)

Datepicker does not render proper month when yearRange does not include now

Reported by: tom.hamming Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

If a datepicker is set to show the year dropdown with a yearRange setting not including today, it still renders the current month when it first comes up. For an example, see http://jsfiddle.net/2ScGt/. The yearRange is set to "2009:2010". It's currently October 2011 (as of writing), so when the datepicker comes up it's showing October with 2009 selected in the year dropdown. But it's rendering October 2011; 10/1 is on a Saturday instead of a Thursday as it was in 2009. Clicking a day in the picker enters that day in 2011 in the textbox. So clicking on the 1 in the month while the datepicker says it's October 2009 puts 10/1/2011 in the textbox.

I think this is related to http://bugs.jqueryui.com/ticket/4641, but 4641 doesn't mention the rendering specifically.

Change History (3)

comment:2 Changed 7 years ago by Scott González

Milestone: 1.9.01.11.0

comment:3 Changed 7 years ago by mikesherov

Resolution: duplicate
Status: newclosed

Duplicate of #4641.

Note: See TracTickets for help on using tickets.