JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<input type="text" id="datepicker" />
<br/> <br/>
<span id="output"></span>
JavaScript
$(function() {
$( "#datepicker" ).datepicker({
dateFormat: "mm/dd/y",
changeYear: true,
yearRange: "1900:2030",
onSelect: function() {
printValue();
}
});
function printValue() {
$("#output").html($( "#datepicker" ).datepicker('getDate'));
}
});