Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function compararFechas(){
- var forma = document.forms[0];
- var frameCierreContable = opener.parent.cierreContable;
- var anioContable = frameCierreContable.document.getElementById("anio").value;
- var mesContable = frameCierreContable.document.getElementById("mes").value;
- var fecha = forma.fechaValoracion.value.split('/');
- var mesValoracion = fecha[1];
- var anioValoracion = fecha[2];
- mesContable = mesContable < 10? '0' + mesContable : mesContable;
- if(mesValoracion != mesContable || anioValoracion != anioContable){
- alert("Son fechas diferentes");
- }else{
- alert("Son fechas iguales");
- }
- }
Add Comment
Please, Sign In to add comment