This question already has an answer here:
- Add days to JavaScript Date 37 answers
I need to be able to add 1, 2 , 5 or 10 days to today's date using jQuery.
This question already has an answer here:
I need to be able to add 1, 2 , 5 or 10 days to today's date using jQuery.
I've found this to be a pain in javascript. Check out this link that helped me. Have you ever thought of extending the date object.
http://pristinecoder.com/Blog/post/javascript-formatting-date-in-javascript
Pure JS solution, with date formatted YYYY-mm-dd format
Why not simply use
or -5 to remove 5 days
You can use this library "Datejs open-source JavaScript Date Library".
Here is a solution that worked for me.