1
I developed this Function to validate date range, but this with a flaw that I can not solve.
If I pass the values:
It should enter the validation and not let save. But it does not happen and I do not know why.
function ValidarDatas() {
var dataInicial = $("#<%=txtDtIni.ClientID%>").val();
var dataFinal = $("#<%=txtDtFim.ClientID%>").val();
if (dataInicial > dataFinal) {
criarDivAlert("Alerta", "Intervalo de datas inválidos");
exibirAlerta(false);
$("#<%=txtDtFim.ClientID%>").focus();
cancelPostback = true;
}
}