2
How do I validate if the date is longer than the other? I’m using .clone
to duplicate the line!
function validaData (local){
$(local).find(".calendario").each(function (index){
var dataInicial = new Date;
var dataFinal = new Date;
dataInicial = $(".data_Inicial").val();
dataFinal = $(".data_Final").val();
if (dataInicial >= dataFinal ) {
alert("Data incorreta!" + dataInicial+" " + dataFinal);
}
else{
alert("data Correta"+ dataInicial +" " + dataFinal);
}
});
}