JSFiddle - React, Tailwind, and code Playground

by Superman

HTML

<div id="datepicker"></div>
<form>
    <label for="AnyInput"></label>
<input id="AnyInput" name="AnyInput">Hello there!</input>
</form>

JavaScript

$('#AnyInput').hide();    
$('#datepicker').datepicker({
    dateFormat: 'dd-mm-yy',
    numberOfMonths: 1,
    onSelect: function(selected,evnt) {
         showMe(selected);/*selected is the date that you can even pass to this function*/
    }
});

function showMe(value){     
    $('#AnyInput').val(value).show();    
}