简体   繁体   中英

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

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});
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM