holas, tengo los dgtes codigos:
Código HTML:
function comparar(date_1, date_2){
var date_start = date_1;
var date_end = date_2;
a_date_start = date_start.split("/");
a_date_end = date_end.split("/");
var auxfec1=Date.parse(a_date_start[1]+"/"+a_date_start[0]+"/"+a_date_start[2]);
var auxfec2=Date.parse(a_date_end[1]+"/"+a_date_end[0]+"/"+a_date_end[2]);
if (auxfec1 == auxfec2){
return true
}
}
function ValidAllDataForm(){
ArrayLength = document.getElementById("hdCounter").value;
var Dia = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");
var Mes = new Array("01","02","03","04","05","06","07","08","09","10","11","12");
var Hoy = new Date();
var Anio = Hoy.getFullYear();
Hoy.setDate(01);
var Fecha = Dia[Hoy.getDate()-1] + "/" + Mes[Hoy.getMonth()] + "/" + Anio;
for ( i = 0; i < ArrayLength; i++ ) {
if ( thisForm.hdItemCodigo(i).value != "" ) {
if ( thisForm.hdItemCodigo(i).value == thisForm.hdItemCodigo(i+1).value ) {
if (comparar(thisForm.txtFchEntrega(i).value, Fecha)) {
alert(thisForm.hdItemCodigo(i+1).value + " son iguales");
thisForm.hdItemCodigo(i+1).value = "02/09/2006";
}
}
}
}
como podran ver quiero pasar hdItemCodigo(i+1) un 02/09/2006, pero no lo hace, podrian ayudarme?
saludos