I only want the date range to be selectable for future days and the first day should be before or the same day as the 2nd day to create a date range.
Input is
first date: 01/23/2020
second date: 03/19/2020
currdate: 12/11/2019
var curdate = month + "/" + day + "/" + year;
if(smsBlackoutFirstDateSelect.value > smsBlackoutSecondDateSelect.value){
alert("second date is before first date");
} else if(smsBlackoutFirstDateSelect.value <= curdate){
alert("first date is on or before today" + " " + smsBlackoutFirstDateSelect.value + " " +
smsBlackoutSecondDateSelect.value + " " + curdate);
} else {
some success function;
}
Output is : first date is on or before today 01/23/2020 03/19/2020 12/11/2019
any idea why it isn't comparing years?