Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Selector de fechas

Estas en el tema de Selector de fechas en el foro de Frameworks JS en Foros del Web. Hola a TODOS... Me he bajado un script jquery que al pulsar en un campo, me despliega un calendario para selecciona una fecha y después ...
  #1 (permalink)  
Antiguo 26/01/2011, 08:43
Avatar de vicenttur  
Fecha de Ingreso: enero-2011
Ubicación: Formentera
Mensajes: 30
Antigüedad: 13 años, 3 meses
Puntos: 1
Pregunta Selector de fechas

Hola a TODOS...
Me he bajado un script jquery que al pulsar en un campo, me despliega un calendario para selecciona una fecha y después me la introduce en el campo, hasta aki todo normal, y funciona bien, pero en ese formulario necesito recoger dos fechas y no condigo que me funcione en dos campos diferentes ... a ver si me podéis echar una mano ... GRACIAS.

este es el código:

<!-- CALENDARIO JQUERY -->
<script type="text/javascript" src="jquery.1.4.2.js"></script>
<script type="text/javascript" src="jsDatePick.jquery.min.1.3.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
useMode:2,
target:"inputField",
dateFormat:"%d-%M-%Y"
/*selectedDate:{ This is an example of what the full configuration offers.
day:5, For full documentation about these settings please see the full version of the code.
month:9,
year:2006
},
yearsRange:[1978,2020],
limitToToday:false,
cellColorScheme:"beige",
dateFormat:"%m-%d-%Y",
imgPath:"img/",
weekStartDay:1*/
});
};
</script>
<!-- CALENDARIO JQUERY -->

...

<input type="text" size="12" id="inputField" />

he intentado de diferentes y diversas maneras, este es el código original funciona bien en un input, como puedo añadir otro input y que funcione también?¿?¿?¿? .... GRACIAS.
  #2 (permalink)  
Antiguo 26/01/2011, 12:12
Avatar de Javier01  
Fecha de Ingreso: febrero-2008
Ubicación: Montevideo
Mensajes: 261
Antigüedad: 16 años, 2 meses
Puntos: 31
Respuesta: Selector de fechas

No tengo el js para probarlo pero ¿probaste duplicando la llamada de la función? Algo como:

Código:
<!-- CALENDARIO JQUERY -->
<script type="text/javascript" src="jquery.1.4.2.js"></script>
<script type="text/javascript" src="jsDatePick.jquery.min.1.3.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script type="text/javascript">

window.onload = function(){
new JsDatePick({
useMode:2,
target:"inputField",
dateFormat:"%d-%M-%Y"
/*selectedDate:{	This is an example of what the full configuration offers.
day:5,	 For full documentation about these settings please see the full version of the code.
month:9,
year:2006
},
yearsRange:[1978,2020],
limitToToday:false,
cellColorScheme:"beige",
dateFormat:"%m-%d-%Y",
imgPath:"img/",
weekStartDay:1*/
});

new JsDatePick({
useMode:2,
target:"inputField2",
dateFormat:"%d-%M-%Y"
/*selectedDate:{	This is an example of what the full configuration offers.
day:5,	 For full documentation about these settings please see the full version of the code.
month:9,
year:2006
},
yearsRange:[1978,2020],
limitToToday:false,
cellColorScheme:"beige",
dateFormat:"%m-%d-%Y",
imgPath:"img/",
weekStartDay:1*/
});
};
</script>
<!-- CALENDARIO JQUERY -->

...

<input type="text" size="12" id="inputField" />
<input type="text" size="12" id="inputField2" />
  #3 (permalink)  
Antiguo 26/01/2011, 13:20
Avatar de vicenttur  
Fecha de Ingreso: enero-2011
Ubicación: Formentera
Mensajes: 30
Antigüedad: 13 años, 3 meses
Puntos: 1
Respuesta: Selector de fechas

Gracias Javier01. Ha funcionado perfectamente!!!

Yo lo habia intentando duplicando toda la etiqueta <script type="text/javascript"> ... ... </script>

y no funcionaba ... GRACIAS.

Etiquetas: fechas, jquery, selector, formulario, campos
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 02:14.