它设置了我提到的minDate..但我想在jquery datepicker中显示默认的mindate 1970-01-26。在这里我已经这样编码了,但是没有用。任何人都可以帮助我吗..
$(function ()
{
var oldMethod = $.datepicker._generateMonthYearHeader;
$.datepicker._generateMonthYearHeader = function()
{
var html = $("<div />").html(oldMethod.apply(this,arguments));
var monthselect = html.find(".ui-datepicker-month");
monthselect.insertAfter(monthselect.next());
return html.html();
}
$('input.datepicker_DOB').datepicker(
{
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
minDate: '1970-01-26'
});
});
我的html代码是:
<input type="text" name="dob" class="datepicker_DOB" >