Skip to main content

Search and Top Navigation

#7782 closed bug (duplicate)

Opened October 11, 2011 06:19PM UTC

Closed October 19, 2012 07:32PM UTC

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.

Attachments (0)
Change History (3)

Changed November 08, 2011 04:24PM UTC by ghostd comment:1

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:2

milestone: 1.9.01.11.0

Changed October 19, 2012 07:32PM UTC by mikesherov comment:3

resolution: → duplicate
status: newclosed

Duplicate of #4641.