#7009 closed bug (fixed)
Reformat minDate/maxDate when dateFormat changes
Reported by: | mystic414 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.11 |
Component: | ui.datepicker | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The minDate/maxDate properties are assumed to be in the same date format as the dateFormat of the datepicker. If the datepicker is later updated to use a new dateFormat, minDate/maxDate remain in the old format and are not used properly by the datepicker.
I submitted a pull request with a fix: https://github.com/jquery/jquery-ui/pull/131
With this change, when a new dateFormat is specified, minDate/maxDate are reformatted with the new date format. This allows the datepicker to parse those dates correctly and properly restrict the range of the datepicker.
I set up a demo at the following sites. bad.html uses the unpatched datepicker and good.html uses the patched one:
http://74.51.109.35/jquery/bad.html http://74.51.109.35/jquery/good.html
The datepicker on the demo pages sets a range from Feb. 10 - Feb 20. When you click the button to change the dateFormat, the datepicker range gets corrupted in bad.html but not in good.html.
I think this patch might also fix ticket:5632.
Change History (3)
comment:1 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Datepicker: Reformat minDate/maxDate when dateFormat changes. Fixes #7009 - Reformat minDate/maxDate when dateFormat changes. (cherry picked from commit 74b7c3f684f5d83effcee6d5099c6fffb020fdf9)
Changeset: 12d38b1886b1e4a17d3bd018f028f7fa2b821229
comment:3 Changed 12 years ago by
Milestone: | 1.9 → 1.8.11 |
---|
Datepicker: Reformat minDate/maxDate when dateFormat changes. Fixes #7009 - Reformat minDate/maxDate when dateFormat changes.