Opened 12 years ago
Closed 12 years ago
#6866 closed bug (worksforme)
setDate adds or subtracts dates from today rather than parsing it correctly
Reported by: | adammw | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.datepicker | Version: | 1.7.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
With the date format set to "yy-mm-dd", setting the date of the datepicker to anything will add or subtract relative to the current date rather than interpreting the absolute date. Removing the dateFormat to leave as default seems to have no effect
e.g. .datepicker('setDate','2001-01-01') ends up selecting 7th of July 2016 (because it is 2001-1-1 days away from today (16 Jan 2011)) .datepicker('setDate','1/1/2001') ends up selecting 11th of July 2016 (because it is 1+1+2001 days away from today (16 Jan 2011))
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This works fine in newer versions.
Note: See
TracTickets for help on using
tickets.
jsFiddle demo http://jsfiddle.net/AMjCh/