How to validate if the date is greater 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);
}
});
}