JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' id='departDate'/>
JavaScript
$( "#departDate" ).datepicker({
showOtherMonths: true,
//inline:true,
dateFormat: 'dd-mm-yy',
numberOfMonths: 2,
selectOtherMonths: true,
minDate: 0
});
/**$(document).on('click',function (e)
{
var container = $("#departDate");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
container.hide();
}
});**/