Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/06/2010, 15:59
sespir
 
Fecha de Ingreso: junio-2010
Mensajes: 2
Antigüedad: 13 años, 10 meses
Puntos: 0
Respuesta: Modificar script calendario

Hola y gracias por contestar.
Al final he conseguido algo anidando la función if:

for (i=1; i<=days_in_month[the_month]; i++)
{ if ((i >= 15) && (the_month == 7) && (the_year == this_year))
{ document.write("<TD BGCOLOR='#CC0000'><B>" + i + "</B></TD>"); // highlite todays date
}
else
if ((i == this_day) && (the_month == this_month) && (the_year == this_year))
{ document.write("<TD BGCOLOR='#CC0000'><B>" + i + "</B></TD>"); // highlite todays date
}
else
{ document.write("<TD BGCOLOR='#33CCFF'><B>" + i + "</B></TD>"); // no highlite for other dates
}

El problema está que resalta del día que le digo hasta el final o hasta el principio de mes. ¿Habría alguna función como la que se utiliza en visual basic ("Entre") para validar entre 2 fechas?.

Última edición por sespir; 15/06/2010 a las 16:17