zeckdude
zeckdude

Reputation: 16183

How can I set default today date using datepicker with jQuery?

I am using the jQuery datepicker(http://keith-wood.name/datepick.html) and I would like to set today's date on the calendar to a date of my choosing that never changes rather than take the system date as today's date. How can I set that up?

Upvotes: 1

Views: 1754

Answers (2)

Sasha Koss
Sasha Koss

Reputation: 16416

Use defaultDate option.

For example in order to set default date to week ago:

$.datepick.setDefaults({defaultDate: -7});

Upvotes: 1

Dustin Laine
Dustin Laine

Reputation: 38543

I believe he has an example under the default date tab on the link you provided. Am I mistaken?

Upvotes: 1

Related Questions