I need to issue an alert if the date you choose is less than the current date. I did so:
var strData = "15/08/2017";
var partesData = strData.split("/");
var data = new Date(partesData[2], partesData[1] - 1, partesData[0]).toDateString();
if(data < new Date().toDateString())
{
alert("Menor");
}
I put day 15 and returned Minor.
That's right
I put day 16 did not return anything.
That's right
I placed Day 17 and returned Minor
You're wrong
I wonder where I'm going wrong