日期选择器如果不可用则突出显示日期

I have this online reservation, and i have this problem, Is there a way i can highlight the unavailable days on the date picker?assuming i have inserted dates on the database. Here's my code for the date picker.

<input type="text" name="pick-up-date" id="pick-up-date" class="form-control datepicker" placeholder="mm-dd-yyyy">

Here's a screenshot:

enter image description here

</div>

Use beforeShowDay() function from jQuery check this

e.g., something like this,

var datesToDisable = ["2015-01-07","2015-17-07","2015-21-07"]; //you have to fetch the dates and put em in an array and wh7atever the format is.

$('#pick-up-date').datepicker({
    beforeShowDay: function(date){
        var string = jQuery.datepicker.formatDate('dd-mm-yy', date);
        return [ datesToDisable.indexOf(string) == -1 ]
    }
});

Should do the trick!