I have a text box id=”somedate” that has a date value “09/27/2009”
I’m looking for an easy way to subtract 7 days and replace the value to 09/20/2009.
then 09/13/2009, etc…at the click of a button
Obviously I need the process to be able to cross back over months and years.
Is there an easy way of doing this in jQuery?
I don’t believe this facility exists in jQuery, but there are libraries like Datejs (clicky) that make managing dates a lot easier. There are really too many pitfalls with date math to try to roll your own.