JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css">
<link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css">
<br/>
From: <input type="text" id="txtFromDate" />
To: <input type="text" id="txtToDate" />
<div id="selected"></div>
CSS
body
{
font-size:8pt;
font-family:Verdana;
padding: 5px;
}
JavaScript
$(document).ready(function(){
$("#txtFromDate").datepicker({
numberOfMonths: 2,
onSelect: function(selected) {
var date=new Date(selected)
day=date.getDate()+2;
newDate=date.getMonth()+1 + "/" + day + "/" + date.getFullYear();
$("#txtToDate").datepicker("option","minDate", newDate);
}
});
$("#txtToDate").datepicker({
numberOfMonths: 2,
onSelect: function(selected,inst) {
$("#txtFromDate").datepicker("option","maxDate", selected)
$("#selected").html(selected);
}
});
});