JSFiddle - React, Tailwind, and code Playground

by alvaroveliz

HTML

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<p>Date: <input type="text" id="datepicker"></p>

CSS

.special a.ui-state-default { background: red; color: white }

JavaScript

var specialDates = new Array("6/8/2015");
function SetDayStyle(date) {
    var enabled = true;
    var cssClass = "";

    var day = date.getDate();
    var month = date.getMonth() + 1; //0 - 11
    var year = date.getFullYear();
    var compare = month + "/" + day + "/" + year;

    if (specialDates.indexOf(compare) >= 0) cssClass = "special";

    return new Array(enabled, cssClass);
}

$(function() {
    $( "#datepicker" ).datepicker({
         beforeShowDay: SetDayStyle
    });
});