到目前为止,我已经显示了预计交货天数,但我想从计算中排除周末和节假日。有任何想法吗?
<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>