2013-12-19 305 views

回答

0

好吧,我解決我的問題有以下幾行。

<script> 
var dates = [ 
    [2013, 12, 24], 
    [2013, 12, 25] 
]; 

var today = new Date(); 
$('#reserve').multiDatesPicker({ 
firstDay: 1, 
numberOfMonths: 4, 
dateFormat: "dd-mm-yy", 
altField: '#dates', 
minDate: 0, 
beforeShowDay: function (date){ 
    var year = date.getFullYear(), month = date.getMonth(), day = date.getDate(); 

    // see if the current date should be highlighted 
    for (var i=0; i < dates.length; ++i) 
     if (year == dates[i][0] && month == dates[i][1] - 1 && day == dates[i][2]) 
     return [false, 'booked']; 

    return [false]; 
    } 
}); 
</script> 
相關問題