JSFiddle - React, Tailwind, and code Playground
by j08691
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<input class="datepicker" id="depart">
<input class="datepicker" id="return">
CSS
.foo a {
font-weight:bold !important;
color:red !important;
}
JavaScript
var dp1 = [];
$("#depart").datepicker({
numberOfMonths: 2,
dateFormat: "m/dd/yy",
onSelect: function (d) {
dp1 = [];
dp1.push(d);
}
});
$("#return").datepicker({
numberOfMonths: 2,
dateFormat: "m/dd/yy",
beforeShowDay: function (date) {
dmy = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear();
if ($.inArray(dmy, dp1) >= 0) {
return [true, "foo"];
} else {
return [true, ""];
}
}
});