Foros del Web » Programando para Internet » Javascript »

Alguien me puede decir como usar esto?

Estas en el tema de Alguien me puede decir como usar esto? en el foro de Javascript en Foros del Web. Hola amigos leyendo el foro encontre lo que necesitaba referente al JSCalendar pero no entiendo donde se coloca esto :S http://www.forosdelweb.com/f13/ayuda...-1-0-a-441852/ es el ultimo post ...
  #1 (permalink)  
Antiguo 16/01/2009, 15:56
 
Fecha de Ingreso: noviembre-2007
Mensajes: 54
Antigüedad: 16 años, 5 meses
Puntos: 0
Alguien me puede decir como usar esto?

Hola amigos leyendo el foro encontre lo que necesitaba referente al JSCalendar
pero no entiendo donde se coloca esto :S

http://www.forosdelweb.com/f13/ayuda...-1-0-a-441852/

es el ultimo post que explica como hacer lo que necesito, si alguien realmente sabe donde colocarlo y me pudiese explicar se lo agradeceria...

de antemano muchas gracias :D
  #2 (permalink)  
Antiguo 16/01/2009, 18:51
Avatar de marcopoloaz06  
Fecha de Ingreso: julio-2007
Ubicación: México
Mensajes: 457
Antigüedad: 16 años, 9 meses
Puntos: 11
Respuesta: Alguien me puede decir como usar esto?

Hola, ps supongo que lo tienes que usar así:
js:
Código javascript:
Ver original
  1. Calendar.setup(
  2. {
  3.     dateStatusFunc: function(date){ // disable weekend days (Saturdays == 6 and Subdays == 0)
  4.         var today = new Date(); //alert(today.getTime());
  5.         return date.getDay() == 0 ||
  6.                (date.getTime() < today.getTime() - (1 * 24 * 60 * 60 * 1000) ||date.getTime() > today.getTime() + (90 * 24 * 60 * 60 * 1000));
  7.     }
  8. }

toda la documentacion viene es esta pág
http://www.dynarch.com/static/jscale...reference.html

saludos
:]
__________________
Aerolíneas Alicia :D
  #3 (permalink)  
Antiguo 19/01/2009, 13:05
 
Fecha de Ingreso: noviembre-2007
Mensajes: 54
Antigüedad: 16 años, 5 meses
Puntos: 0
Respuesta: Alguien me puede decir como usar esto?

Mi funcion del JsCalendar esta asi...

Código:
              <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 d = calendar.date.getDate();      // integer, 1..31
	  var y = calendar.date.getFullYear();
      var m = calendar.date.getMonth();     // integer, 0..11
      m = m + 1;
	  
      // redirect...
      //window.location = "/" + y + "/" + m + "/" + d + "/index.php";
	 ;
	  location.href = 'seleccion.php?event='+y+'-'+m+'-'+d+'&day='+d+'&mes='+m+'&year='+y;
    }
  };


  Calendar.setup(
    {
      flat         : "calendar-container", // ID of the parent element
      flatCallback : dateChanged           // our callback function
      dateStatusFunc: function(date){ // disable weekend days (Saturdays == 6 and Subdays == 0)
	  var today = new Date(); //alert(today.getTime());
	  return date.getDay() == 0 ||
	  (date.getTime() < today.getTime() - (1 * 24 * 60 * 60 * 1000) ||date.getTime() > today.getTime() + (90 * 24 * 60 * 60 * 1000));
	
	}
  );
                  </script>
y no me hace nada :S la parte del setup antes estaba asi y anda bien pero me habilita lo demas :S

Código:
  Calendar.setup(
    {
      flat         : "calendar-container", // ID of the parent element
      flatCallback : dateChanged           // our callback function
	
	}
  );

alguien ke me diga en ke estoy mal :S gracias
  #4 (permalink)  
Antiguo 19/01/2009, 14:10
 
Fecha de Ingreso: noviembre-2007
Mensajes: 54
Antigüedad: 16 años, 5 meses
Puntos: 0
Respuesta: Alguien me puede decir como usar esto?

Finalmente lo deje ahi
Código:
  Calendar.setup(
    {
      flat         : "calendar-container", // ID of the parent element
      flatCallback : dateChanged,          // our callback function
      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() + (90 * 24 * 60 * 60 * 1000));
    }                        
	
	}
  );
No se puede seleccionar dias anteriores:D gracia a todos
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 22:36.