JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<table id="table2" border="1" >
<tr>
<td style="margin-right: auto"><img id = "Retrieve" style="cursor: pointer" height="30" width="30"/></td>
</tr>
</table>
</div>
JavaScript
document.getElementById('Retrieve').onclick = function(e)
{
var dt = new Date('2011-01-11');
var todaydate = new Date()
alert(dt.getDate());
alert(dt.getMonth() +1 );
alert(dt.getFullYear());
alert(todaydate);
alert(todaydate.getDate());
alert(todaydate.getMonth() + 1);
alert(todaydate.getFullYear());
if (dt.getDate() == todaydate.getDate() && dt.getMonth()+1 == todaydate.getMonth()+1 && dt.getFullYear() == todaydate.getFullYear())
{
alert('match');
}
else
{
alert('not match');
}
}