Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/06/2010, 05:54
sanref
 
Fecha de Ingreso: mayo-2004
Mensajes: 189
Antigüedad: 20 años
Puntos: 1
Respuesta: Datepicker con 2 input

Cita:
Iniciado por Black_StorM Ver Mensaje
Puedes decirme como le aplicas el datepicker a los 2 input ? a mi me lo aplica solo a 1 .. :S no se como hacer para que salga en los 2.
Mil gracias !
al textbox asignale la siguiente clase CSS:

embed dpDate

Despues, el Javascript es:

Código:
$(function() {
            $('#txtFechaDesde,#txtFechaHasta').datepick({dateFormat: 'dd/mm/yy', beforeShow: customRange, 
                showOn: 'both', changeMonth: false, changeYear: false, buttonImageOnly: true, buttonImage: '../js/dataPicker/calendar.gif',
                showAnim: 'slideDown', duration: 'normal'}); 
            
        });
        
        function customRange(input) {  
            return {minDate: (input.id == "txtFechaHasta" ? 
                $("#txtFechaDesde").datepick("getDate") : null),  
                maxDate: (input.id == "txtFechaDesde" ? 
                $("#txtFechaHasta").datepick("getDate") : null)};  
        }
        
        function customRange2(input) {  
            return {minDate: (input.id == "txtFechaPagoCheque" ? 
                $("#txtFechaEmision").datepick("getDate") : null),  
                maxDate: (input.id == "txtFechaEmision" ? 
                $("#txtFechaPagoCheque").datepick("getDate") : null)};  
        }
saludos
__________________
Nadie nacío sabiendo...