Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/09/2011, 23:59
Avatar de richardinj
richardinj
 
Fecha de Ingreso: enero-2005
Ubicación: Ciber Espacio
Mensajes: 2.180
Antigüedad: 19 años, 3 meses
Puntos: 11
¿Como Establecer fecha con JSCalendar?

Hola.. como puedo hacer para que JScalendar me asigne una fecha especifica?

tengo esto

<script type="text/javascript">
function dateChanged(calendar) {
// Beware that this function is called even if the end-user only
// changed the month/year. In order to determine if a date was
// clicked you can use the dateClicked property of the calendar:
if (calendar.dateClicked) {
// OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
var y = calendar.date.getFullYear();
var m = calendar.date.getMonth(); // integer, 0..11
var d = calendar.date.getDate(); // integer, 1..31
// redirect...
window.location = "index.php?d="+d+"&m="+(m+1)+"&y="+y;
}
};

Calendar.setup(
{
date: 20100601,
flat : "calendar-container", // ID of the parent element
flatCallback : dateChanged // our callback function

}
);
</script>


Lei por ahi que es date:, pero como ven en el ejemplo al usar la fecha asi me sale 1 de Enero de 1970 (01/01/1970)

Asi es el formato?

Saludos