Foros del Web » Programando para Internet » Javascript »

Fechas

Estas en el tema de Fechas en el foro de Javascript en Foros del Web. Necesito que al ingresar en un campo: Fecha Inicio : DD/MM/AAAA En la fehca Fin lo copie tal cual como aparece en Fecha Inicio, es ...
  #1 (permalink)  
Antiguo 28/04/2006, 15:18
 
Fecha de Ingreso: abril-2006
Mensajes: 3
Antigüedad: 18 años
Puntos: 0
Fechas

Necesito que al ingresar en un campo:
Fecha Inicio : DD/MM/AAAA
En la fehca Fin lo copie tal cual como aparece en Fecha Inicio, es decir darle un valor minimo como seria la fecha, xq podria terminar el mismo dia... alguien em ayuda..
Fecha Fin :


tengo el siguiente codigo

<!--FECHAS-->
<table width="810" border="0" cellpadding="2" cellspacing="0" bordercolor="#990000">
<tr valign="middle" bgcolor="#CCCCFF">
<td width=103>Desde </td>
<td width=135><!--<select name="day_from" class="Estilo2" id="select">
<option value="">--elija--</option>
<?
for ($fd=$month_first_day;$fd<=$month_last_day;$fd++):
$fd2 = $fd;
$the_month2 = $the_month;
if (strlen($fd)==1) $fd2 = "0".$fd;
if (strlen($the_month)==1) $the_month2 = "0".$the_month;
?>
<option value="<?= $fd?>">
<?= $fd2."-".$the_month2."-".$the_year ?>
</option>
<?
endfor;
?>
</select>-->
<input name="day_from" type="text" class="Estilo2" id="day_from" size="10" maxlength="10">
<a href="javascript:void(0)" onClick="open_cal('day_from')"><img src="images/b_calendar.gif" width="16" height="16" border="0"></a> </td>
<td width=50>Hasta</td>
<td width=127><!--<select name="day_to" class="Estilo2" id="select5">
<option value="">--elija--</option>
<?
for ($fd=$month_first_day;$fd<=$month_last_day;$fd++):
$fd2 = $fd;
$the_month2 = $the_month;
if (strlen($fd)==1) $fd2 = "0".$fd;
if (strlen($the_month)==1) $the_month2 = "0".$the_month;
?>
<option value="<?= $fd?>">
<?= $fd2."-".$the_month2."-".$the_year ?>
</option>
<?
endfor;
?>
</select>-->
<input name="day_to" type="text" class="Estilo2" id="day_to" size="10" maxlength="10">
<a href="javascript:void(0)" onClick="open_cal('day_to')"><img src="images/b_calendar.gif" width="16" height="16" border="0"></a>

Mezcla de PHP con JavaSript
  #2 (permalink)  
Antiguo 30/04/2006, 09:11
Avatar de dogduck  
Fecha de Ingreso: enero-2006
Ubicación: ¿Atlantida, Hesperides, Islas afortunadas?
Mensajes: 2.231
Antigüedad: 18 años, 4 meses
Puntos: 19
Mira a ver si esto te vale

Código HTML:
...
<script>
function copia(valor){
 window.day_to.value=valor;
}
</script>
<input name="day_from"   onkeyup="copia(day_from.value)" type="text" class="Estilo2" id="day_from" size="10" maxlength="10">
<a href="javascript:void(0)" onClick="open_cal('day_from')"><img src="images/b_calendar.gif" width="16" height="16" border="0"></a> </td>
<td width=50>Hasta</td> 
  #3 (permalink)  
Antiguo 03/05/2006, 09:43
 
Fecha de Ingreso: abril-2006
Mensajes: 3
Antigüedad: 18 años
Puntos: 0
exactamente en que parte deberia colocar ese codigo q me enviaste, lo encuentro un poco dificil de entender.. soy cuasi-novo en este aspecto de programacion, necesito tu ayuda porfa.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:39.