JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<p>Date: <input type="text" id="datepicker" /></p>
JavaScript
var activeMonth = new Date().getMonth() + 1;
$(function() {
console.log(activeMonth);
$("#datepicker").datepicker({
onChangeMonthYear: function (year, month, inst) {
activeMonth = month;
console.log(activeMonth);
},
beforeShowDay: function (date) {
console.log(date + " > " + activeMonth);
return [true, ""]
}
});
});