可能重复:
Can the jQuery UI Datepicker be made to disable Saturdays and Sundays (and holidays)?
到目前为止,我已经显示了预计交付天数,但我想从计算中排除周末和假期。有什么想法吗?
<script>
$(function () {
$("#datepicker").datepicker({
onSelect: function () {
var start = $('#datepicker').val();
var date = new Date(start);
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var myday = new Date(y, m, d + 10);
$('#showdate').val($.datepicker.formatDate('mm/dd/yy', myday));
}
});
});
</script>