I need to validate the start date and end date ...
So the end date can not be less than the start date, but since I started messing with javascript less than two weeks ago I'm knocking a little.
It would be this case below:
Both for DataInicioCurso
and DataFimCurso
and DataInicioDisciplina
and DataFimDisciplina
.
Would you like to do a validation here? Thank you!
function PreencherDadosTurma(data) {
var turma = data;
turma.IdInstituicaoDeEnsino = jq.IdInstituicaoDeEnsino.val();
turma.InstituicaoDeEnsino.IdRedeOfertante = jq.idRedeOfertante.val();
turma.IdCurso = jq.IdCurso.val();
turma.Descricao = jq.Descricao.val();
turma.QtdEstudante = jq.QtdEstudante.val().ToInt32();
turma.DataInicioCurso = jq.DataInicioCurso.val();
turma.DataFimCurso = jq.DataFimCurso.val();
turma.DataInicioDisciplina = jq.DataInicioDisciplina.val();
turma.DataFimDisciplina = jq.DataFimDisciplina.val();
turma.EmpreendedorismoAplicado = jq.EmpreendedorismoAplicadoSim.prop('checked') ? jq.EmpreendedorismoAplicadoSim.val() : jq.EmpreendedorismoAplicadoNao.val();
turma.IdTurma = jq.IdTurma.val().ToInt32();
return turma;
}