尝试在末尾而不是开头设置日期,这是工作演示http://jsfiddle.net/DBpJe/1446/
$(function() {
var queryDate = '2009-11-01',
dateParts = queryDate.match(/(\d+)/g)
realDate = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
// months are 0-based!
$('#startDate').datepicker({
dateFormat: "MM yy"
}) // format to show
.datepicker("option", "changeMonth", true)
.datepicker("option", "changeYear", true)
.datepicker("option", "showButtonPanel", true)
.datepicker("option", "onClose", function(e){
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker("setDate",new Date(year,month,1));
}).datepicker('setDate',realDate);
});