#6829 closed enhancement (wontfix)
Ability to use setDate date with any date not just "Today"
Reported by: | nobelisp | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.datepicker | Version: | 1.8.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The ability to use setDate to add days, month and years is really useful as Javascript's setDate function does not work over month barriers.
Propose enhancing the setDate function to be able to modify any given date and not just "Today".
Example: var dt = $("#datePicker1"); dt.datepicker("setDate", [dateObject or string], "+7d");
If you wanted to add 7 days to the currently selected date then: dt.datepicker("setDate", dt.getDate(), "+7d");
Change History (3)
comment:1 follow-up: 2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Replying to scott.gonzalez:
This should live in a lower-level date utility, which datepicker should be built on top of. The datepicker widget shouldn't expose that functionality through its own API.
Agreed, however what is the lower-level date utility for JQuery? Secondly why provide such a feature as +5d but only allow it to be applicable to Today? and not the currently selected date or any date for that matter.
Lastly if you were so strict about not duplicating lower level date functionality why provide formatDate under datepicker?
I think there is great potential for setDate modifiers to be applicable to a date and especially when you are using two instances to provide from and two dates.
This should live in a lower-level date utility, which datepicker should be built on top of. The datepicker widget shouldn't expose that functionality through its own API.