Changing jquery ui datepicker programmatically

I have a jquery ui datepicker in my page. It is related to the range, not the input. He is currently tweeked to pick a week at a time. I also have two buttons on my page "Previous Week" and "Next Week". I want buttons to control what the datepicker is selected. (for example, jump forward / backward one week when pressed).

I'm not sure how to grab the datepicker so I can fiddle with it (or what I'm really running into is if there is a real "object" in there, or is it just loading a css / html component like ui-datepicker-current-day 'etc.).

+3


source to share


1 answer


there is a real object that you can refer to.

Example:

var datePicker = $("#id").datepicker({firstDay: 1});

      



to see what you can do with it check:

http://jqueryui.com/demos/datepicker/

+5


source







All Articles