JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/start/jquery-ui.css">
<p>Date: <input type="text" id="datepicker"></p>
JavaScript
$('#datepicker').datepicker({
minDate: '0',
maxDate: '',
onClose: function() {
if ($('#datepicker').val() != '') {
$('#submitForm').submit();
}
}
});