#4870 closed bug (fixed)
yearRange doesn't work as expected
Reported by: | mg | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8 |
Component: | ui.datepicker | Version: | 1.7.2 |
Keywords: | yearRange, datepicker | Cc: | [email protected]…, [email protected]… |
Blocked by: | Blocking: |
Description
The bug occurs when one uses relative yearRange values with option changeYear: true, for example:
yearRange: '-100:+0', changeYear: true,
With this example configuration list of years gets broken after date selection:
- List is 1909-2009
- We select 1909
- List is now 1809-1909
- We cannot select above 1909 - Bug
Attachments (3)
Change History (6)
Changed 13 years ago by
Attachment: | datepicker1.png added |
---|
Changed 13 years ago by
Attachment: | datepicker2.png added |
---|
Changed 13 years ago by
Attachment: | datepicker3.png added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Milestone: | TBD → 1.8 |
---|
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r3485. Year range now has three formats: 'c-n:c+n' for years relative to the currently displayed year, '-n:+n' for years relative to today's year, 'nnnn:nnnn' absolute years, and the default value has changed to 'c-10:c+10' to retain backward compatibility. These formats may be mixed for the start and end of the range, e.g. '2000:-5'.
Note: See
TracTickets for help on using
tickets.
It is a bug indeed, but it can be easily solved with something like:
yearRange: '-120:' + new Date().getFullYear()
Anyway it's something that should be fixed.
Replying to mg: