javascript - Jumping a week or month in the jQuery UI Datepicker -


responded to a good job.

How did they use the link to update the selection of jQueryUI Datepicker? His solution was:

  $ ('a # next'). Click (function () {var $ picker = $ ("# datepicker"); var date = new date ($ picker date picture ('match')); date. Date date (date .getDate (+ 1); $ Pickerdepacker ('set date', date); return false;});  

I'm trying to modify it for the same thing for a week or a month. According to the API, I should be able to use "+ 1m" and "+ 1w" to leave a month or week. I'm unable to get the code with anything other than "+1"

Thoughts?

You can use the same code that you have when you want to be one week Do:

  Date .setDate (date.getDate () + 7);  

When you want a month, you can:

  date.setMonth (date.getMonth () + 1);  

Comments