Opened 14 years ago
Closed 14 years ago
#4567 closed bug (wontfix)
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: | [email protected]… | |
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 (3)
Changed 14 years ago by
Attachment: | changeyearproblem.JPG added |
---|
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:2 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
snapshot of the problem