Skip to main content

Search and Top Navigation

#4567 closed bug (wontfix)

Opened May 31, 2009 07:50AM UTC

Closed June 11, 2009 10:34AM UTC

changeYear setting results in truncated list of options in the drop-down

Reported by: badikumar Owned by:
Priority: major Milestone: 1.8
Component: ui.datepicker Version: 1.7.1
Keywords: Cc: badikumar@gmail.com
Blocked by: Blocking:
Description

I have the following setting:

$.datepicker.setDefaults({ changeYear: true, yearRange: '-80:+10' });

$("#dateOfBirth").datepicker({ maxDate: '-16y', minDate: '-80y' });

With this setting, the drop down list shows the options from 1929 to 1993. Say, now I choose 1929 and click the drop down again, I only see 10 options in the list from 1929 to 1939-- that is 10 values ahead of the current selection-- and the rest of the options in the drop-down list have disappeared!

In this example, this problem appears only if the values before 1983 are selected. The option list starts getting truncated so that options that are only upto 10 years ahead of the current selection are shown.

Attachments (1)
Change History (2)

Changed June 01, 2009 03:33PM UTC by jzaefferer comment:1

milestone: TBD1.8

Changed June 11, 2009 10:34AM UTC by kbwood comment:2

resolution: → wontfix
status: newclosed

Setting the yearRange to '-80:+10' indicates years relative to the selected date. This is further constrained by any minimum/maximum dates. Thus you only see 1929 to 1939 when a date in 1929 is selected. You should probably set the yearRange to '1929:1993' instead.