Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/06/2004, 22:48
orharo2003
 
Fecha de Ingreso: abril-2004
Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 21 años
Puntos: 4
Son fáciles de hacer, te pongo de muestra uno que hice. lo único que tendrás que agregarle será el objeto válido a donde quieres que te envie la fecha, y lo puedes abrir usando los sig parametros:

window.open "calendario.asp","","height=223,width=208"

<title>
Calendario
</title>
<%
'[email protected]
'Modulo 3-1
'Sistema Integral de Facturación [NEOGA]

if(Request.Form("valormes")="")then
envio_de_fecha=date
fecha_obtenida=date
mes=month(date)
else
fecha_obtenida=dateadd("m",cint(Request.Form("valo rmes")),Request.Form("fecha_oculta"))
mes=month(fecha_obtenida)
envio_de_fecha=fecha_obtenida
end if
mesagregado=mes+1
%>
<body link=black vlink=black alink=black>
<form name="frm" action="calendario.asp" method="post">

<fieldset style="BORDER-RIGHT: #6699ff thick inset; BORDER-TOP: #6699ff thick outset; BORDER-LEFT: #6699ff thick outset; BORDER-BOTTOM: #6699ff thick inset">
<TABLE cellPadding=0 width="100%" cellspacing="1" cellpadding=20 border=2 bordercolor="gray" style="BORDER-COLLAPSE: collapse">

<tr><td bgcolor="#BECFDF"><a href="" title="Regresar 1 mes" style="text-decoration:none" onclick="beforesending();return false"><FONT SIZE=4 color=black><B><center> - </a></td><td colspan=5 bgcolor="#dbe7f3"><font size=2><center><B><%=UCASE(monthname(mes))%> , <%=year(fecha_obtenida)%></font></td><td bgcolor="#BECFDF"><a href="" title="Adelantar 1 mes" style="text-decoration:none" onclick="aftersending();return false"><b><FONT SIZE=4 color=black><center> + </td>
<tr><!--LLENAR FORMATO EL CALENDARIO-->
<td bgcolor="#BECFDF"><font face=arial size=2><b><center>D</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>L</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>M</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>M</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>J</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>V</td><td bgcolor="#BECFDF"><font face=arial size=2><b><center>S</td>
<%


cuantosdias=datediff("d",dateserial(year(fecha_obt enida),mes,1),dateserial(year(fecha_obtenida),mesa gregado,1))
primeravez=true
iniciodesemana=datepart("w",dateserial(year(fecha_ obtenida),mes,1))
dias_pasados=1
dia=cint(datepart("d",date))
for semana=1 to 6
if(semana=6 and dias_pasados>cuantosdias)then
exit for
end if
Response.Write "<tr>"
for dias=1 to 7
if(dias=1 or dias=7)then
fondo="#BECFDF"
else
fondo="#dbe7f3"
end if
if(dia=dias_pasados)then
color="red"
else
color="black"
end if
if(len(dias_pasados)=1)then
vb="&nbsp;&nbsp;"
else
vb="&nbsp;"
end if
if(dias<>iniciodesemana and primeravez=true)then
Response.Write "<td bgcolor="&fondo&">&nbsp;</td>"
else
if(dias_pasados<=cuantosdias)then
primeravez=false
if(fondo="#BECFDF")then
%>
<td bgcolor="<%=fondo%>" bordercolor="6699ff" ><input size=1 onMouseOut="this.style.backgroundColor='<%=fondo%> ';this.style.color='black'" OnMouseOver="this.style.backgroundColor='#dbe7f3'; this.style.color='blue'" value=<%=vb&dias_pasados%> style="BACKGROUND-COLOR:#BECFDF;FONT-SIZE: xx-small;WIDTH: 20px; HEIGHT: 17px;cursor:hand;FONT-WEIGHT: bold;BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none; color=<%=color%>" readonly onclick="dia_js(this.value)"></td>


<%else

%>

<td bgcolor="<%=fondo%>" bordercolor="6699ff"><input size=1 onMouseOut="this.style.backgroundColor='<%=fondo%> ';this.style.color='black'" OnMouseOver="this.style.backgroundColor='#BECFDF'; this.style.color='blue'" value=<%=vb&dias_pasados%> style="BACKGROUND-COLOR:#dbe7f3;FONT-SIZE: xx-small;WIDTH: 20px; HEIGHT: 17px;cursor:hand;FONT-WEIGHT: bold;BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none; color=<%=color%>" readonly onclick="dia_js(this.value)"></td>
<%end if
dias_pasados=dias_pasados+1
else
Response.Write "<td bgcolor="&fondo&">&nbsp;</td>"
end if
end if
next
Response.Write "</tr>"
next
%>

</table>

<input type="hidden" name="valormes">
<input type="hidden" name="fecha_oculta" value=<%=envio_de_fecha%>>
</fieldset>
</form>

<script language="jscript">
function dia_js(escogido)
{
fromjs(escogido);
}

</script>


<script language="vbs">
document.title=date()
function beforesending()
frm.valormes.value=-1
frm.submit()

end function


function aftersending()
frm.valormes.value=1
frm.submit()

end function
function fromjs(b)
window.opener.printing.fecha_inicio.value=dateadd( "d",cint(b)-1,dateserial(year(frm.fecha_oculta.value),datepart ("m",frm.fecha_oculta.value),1))
window.close
end function
'By orharo2003
</script>
</body>