Opened 11 years ago
Closed 10 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:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
Milestone: | 1.9.0 → 1.11.0 |
---|
Pull request: https://github.com/jquery/jquery-ui/pull/521