JSFiddle - React, Tailwind, and code Playground
HTML
<p>Date:
<input id="datepicker" type="text">
<input id="textnew" type="text">
</p>
JavaScript
$(document).ready(function() {
$('#txtDate').blur(function() {
if(validateDate('txtDate'))
{
alert('Date is valid');
}
else
{
alert('Invalid Date!!!');
}
});
});