I have a form input with an id of \'date_trans\'. The format for that date input (which is validated server side) can be any of:
There is a simpler solution
if (inputDate.getDate() === todayDate.getDate()) { // do stuff }
like that you don't loose the time attached to inputDate if any
inputDate