答案 0 :(得分:-1)
$('#startDate').datepicker({
timepicker:false,
format:'m/d/Y',
formatDate:'m/d/Y',
minDate:0,
readOnly: true,
onSelect: function(selected) {
var dt = new Date(selected); // selected datetime
or
var dt = new Date(); // current datetime
dt.setDate(dt.getDate() + 1);
}
}).keyup(function(e) {
if (e.keyCode == 8 || e.keyCode == 46) {
$.datepicker._clearDate(this);
}
});