JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="date">
<input type="button" id="btn" value="Show"/>
JavaScript
$( "#date" ).datepicker({dateFormat: 'mm-dd-yy'});
$('#btn').click(function(){
var _myDate = new Date($('#date').val() );
document.write('dfdg'+ _myDate)
alert(_myDate);
});