JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type="text" id="from" />
<input type="submit" />
</form>
JavaScript
$("#from").datepicker({
dateFormat: 'yy-mm-dd'
});
$("form").submit(function() {
alert($("#from").val());
return false;
});