JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/cupertino/jquery-ui.css">
<div id="datepicker"></div>
JavaScript
var dates = [
[2018, 12, 1],
[2018, 12, 9],
[2018, 11, 25]
];
$('#datepicker').datepicker({
beforeShowDay: function (date){
var year = date.getFullYear(), month = date.getMonth(), day = date.getDate();
console.log(year + ' - ' + parseFloat(month+1) + ' - ' + day);
for (var i=0; i < dates.length; ++i)
if (year == dates[i][0] && month == dates[i][1] - 1 && day == dates[i][2])
return [false, 'ui-state-highlight ui-state-active'];
return [false];
}
});