Satch3000
Satch3000

Reputation: 49384

JQuery Mobile ui-datepicker go to specific month onload

How can I go to a specific month when the document loads please?

Here is the link to it:

http://jquerymobile.com/test/experiments/ui-datepicker/

Thanks

Upvotes: 0

Views: 1072

Answers (1)

mplungjan
mplungjan

Reputation: 178094

Something like this (not tested)

$(document).ready(function() { 
  var queryDate = new Date(2011,5,1,0,0,0); // 1st of June 2011
  $('#date').datepicker({defaultDate: queryDate});
});

Upvotes: 2

Related Questions