Datepicker holidays

Shows a datepicker that pass non working days

HTML

<input id="iDate">

CSS

.holidays {
    background-image: none;
    opacity: .35;
}
.holidays>.ui-state-default.ui-state-highlight, .holidays>.ui-state-default {
    background: #A31212;
    color: #FFF;
    opacity: .35;
}

JavaScript

var unavailableDates = ["15-8-2018", "17-8-2018", "13-8-2018"];

function unavailable(date) {
    dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
    if ($.inArray(dmy, unavailableDates) == -1) {
        return [true];
    } else {
        return [true, "holidays", "No disponible"];
    }
}

$(function () {
    $("#iDate").datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'dd/mm/yy',
        beforeShowDay: unavailable,
        yearRange: "1920:2020"
    });
});