Ver Mensaje Individual
  #11 (permalink)  
Antiguo 06/08/2007, 02:25
kitune
 
Fecha de Ingreso: julio-2005
Mensajes: 275
Antigüedad: 18 años, 9 meses
Puntos: 3
Re: jscalendar: conectar calendarios

Nada, lo unico que he hecho es poner el codigo que me dijistes dentro de un HTML, lo pego tal cual, ok?

Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>prueba</TITLE>
<SCRIPT 
src="Alojamientos%20-%20Apartamentos%20en%20Valencia_archivos/calendar.js" type=text/javascript></SCRIPT>
<SCRIPT src="Alojamientos%20-%20Apartamentos%20en%20Valencia_archivos/calendar-es.js" type=text/javascript></SCRIPT>
<SCRIPT src="Alojamientos%20-%20Apartamentos%20en%20Valencia_archivos/calendar-setup.js" type=text/javascript></SCRIPT>
</HEAD>
<BODY>
<script type="text/javascript">//<![CDATA[

    function closed(cal) {

		//Sync calendars
		if(cal.element.parentNode.id == 'cal1') {			
			two.setDate(new Date(one.date.getFullYear(), one.date.getMonth()+1, 1))
			three.setDate(new Date(one.date.getFullYear(), one.date.getMonth()+2, 1))
		} else if(cal.element.parentNode.id == 'cal2') {
			one.setDate(new Date(two.date.getFullYear(), two.date.getMonth()-1, 1))
			three.setDate(new Date(two.date.getFullYear(), two.date.getMonth()+1, 1))
		} else if(cal.element.parentNode.id == 'cal3') {
			one.setDate(new Date(three.date.getFullYear(), three.date.getMonth()-2, 1))
			two.setDate(new Date(three.date.getFullYear(), three.date.getMonth()-1, 1))
		} 
      
    };

    var one = Calendar.setup(
    {
		flat		: 'cal1',
		align		: 'BL',
		weekNumbers	: false,
		showOthers	: true,
		onUpdate	: closed
    });
	
	var two = Calendar.setup(
    {
		flat		: 'cal2',
		align		: 'BL',
		weekNumbers	: false,
		showOthers	: true,
		onUpdate	: closed
    });
	
	var three = Calendar.setup(
	{
		flat		: 'cal3',
		align		: 'BL',
		weekNumbers	: false,
		showOthers	: true,
		onUpdate	: closed
    });
  
//]]></script>
</BODY>
</HEAD>
Y los archivos son los que me distes.

Un saludo!