JSFiddle - React, Tailwind, and code Playground

HTML

<li><label for="from">From</label>
<input readonly="true" type="text" name="from" id="from" value="Click here to choose!" class="requiredField" style="position: relative; z-index: 100000;" />
</li>
<li><label for="to">To</label>
<input readonly="true" type="text" name="to" id="to" value="Click here to choose!" class="requiredField" style="position: relative; z-index: 100000;" />
</li>

JavaScript

<script src="http://jqueryui.com/jquery-1.6.2.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script>
var unavailableDates = ["13-12-2011","14-12-2011","15-12-2011","16-12-2011","8-2-2012","9-2-2012","10-2-2012","11-2-2012","12-2-2012","13-2-2012","14-2-2012","15-2-2012","16-2-2012","17-2-2012","18-2-2012","19-2-2012","20-2-2012","21-2-2012","22-2-2012","23-2-2012","24-2-2012","25-2-2012","26-2-2012","27-2-2012","28-2-2012","29-2-2012","1-3-2012","2-3-2012","3-3-2012","4-3-2012","5-3-2012","6-3-2012","7-3-2012","8-3-2012","9-3-2012","10-3-2012","11-3-2012","12-3-2012","13-3-2012","14-3-2012","15-3-2012","25-3-2012","26-3-2012","27-3-2012","28-3-2012","29-3-2012","30-3-2012","31-3-2012","1-4-2012","2-4-2012","3-4-2012","4-4-2012","5-4-2012","6-4-2012","7-4-2012","8-4-2012","9-4-2012","10-4-2012","11-4-2012","12-4-2012","13-4-2012","14-4-2012","15-4-2012","16-4-2012","17-4-2012","18-4-2012","19-4-2012","20-4-2012","21-4-2012","22-4-2012","23-4-2012","24-4-2012","25-4-2012","26-4-2012","27-4-2012","28-4-2012","29-4-2012","30-4-2012","1-5-2012","2-5-2012","3-5-2012","4-5-2012","5-5-2012","6-5-2012","7-5-2012","8-5-2012","9-5-2012","10-5-2012","11-5-2012","12-5-2012","13-5-2012","14-5-2012","15-5-2012","16-5-2012","17-5-2012","18-5-2012","19-5-2012","20-5-2012","22-1-2012","23-1-2012","24-1-2012","25-1-2012","26-1-2012","27-1-2012","28-1-2012","29-1-2012","30-1-2012","3-1-2012","4-1-2012","12-1-2012","13-1-2012","14-1-2012","15-1-2012","16-1-2012","17-1-2012"];
function unavailable(date) {
dmy = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear();
if ($.inArray(dmy, unavailableDates) == -1) {
return [true, ""];
} else {
return [false,"","Unavailable"];
}
}
$(function() {
var dates = $( "#from, #to"...