Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/08/2010, 06:04
DavidBL
 
Fecha de Ingreso: diciembre-2009
Ubicación: España
Mensajes: 380
Antigüedad: 14 años, 4 meses
Puntos: 1
Exclamación

Hola miren tengo un problema.
En JSCalendar los dias(%d) mes(%m) y año(%Y) se indican así(como he puesto en los parentesis)
Entonces en un campo tipo text pone(por ejemplo) 20/08/2010.
Pero como podria hacer para insertarlo en la base de datos, el dia en dia, el mes en mes y el año en año?
Porque podría insertarlo(hasta donde yo se) en un campo todo, pero no separado.
Dejo el código:
Cita:
<html style="background-color: buttonface; color: buttontext;">

<head>
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />

<title>Simple calendar setups [popup calendar]</title>

<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" />

<!-- main calendar program -->
<script type="text/javascript" src="calendar.js"></script>

<!-- language for the calendar -->
<script type="text/javascript" src="lang/calendar-es.js"></script>

<!-- the following script defines the Calendar.setup helper function, which makes
adding a calendar a matter of 1 or 2 lines of code. -->
<script type="text/javascript" src="calendar-setup.js"></script>

</head>

<body>
<form action="#" method="get">
<input name="date" type="text" id="f_date_f" readonly="readonly" /><br>
<input type="reset" id="show_f" value=" ... "
onclick="return showCalendar('sel3', '%d/%m/%Y');">
</form>




<script type="text/javascript">
Calendar.setup({
inputField : "f_date_f", // id of the input field
ifFormat : "%d/%m/%Y", // format of the input field (even if hidden, this format will be honored)
displayArea : "show_f", // ID of the span where the date is to be shown
daFormat : "%A, %B %d, %Y",// format of the displayed date
align : "Tl", // alignment (defaults to "Bl")
dateStatusFunc : function (date) { // disable weekend days (Saturdays == 6 and Subdays == 0)
var today = new Date();
//alert(today.getTime());
return (
date.getDay() == 7 || (date.getTime() < today.getTime()-(1*24*60*60*1000) || date.getTime() > today.getTime()+(730*24*60*60*1000))

) ? true : false; }
});
</script>


</body>
</html>
y por cierto gracias adelantadas

Última edición por GatorV; 06/08/2010 a las 08:40