Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
JQUERY Datetimepicker not scrolling dates

I have a jQuery dateTimePicker in my WordPress project. The picker works well but when I select date dropdown and try to scroll with my mouse wheel, the years don't scroll. Instead, the months change.. Any idea how I can get the date dropdown to scroll years properly?

Here's my JS code:

        var preferredDateTimePicker              = $('#preferred-date-time .preferred-datetimepicker');


preferredDateTimePicker.datetimepicker({
         disabledDates : disabledDates, formatDate:'d-m-Y',
         allowTimes    : allowTimes,
         minDate       : 0,
         format        : 'd-m-Y H:i:s',
         inline        : true,

         onGenerate:function( ct ){
            $(this).find('.xdsoft_date.xdsoft_weekend').addClass('xdsoft_disabled');
         },

         onClose: function(dateText, inst) { 
            var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
            $(this).datepicker('setDate', new Date(year, 1, 1));
        },


         onChangeDateTime:function(dp,input){

                getCalenderValue = preferredDateTimePicker.val();
                newCalenderDate  = getCalenderValue.split(' ')[0];

                var selectedBlockDateTime = $.map(disabledDatetime, function(value, key) {
                    if(newCalenderDate == key){

                         var obj = {};
                             obj['blockDate'] = key; 
                             obj['blockTime'] = value;
                             return obj;
                    }
                });

                if(selectedBlockDateTime.length){

                    var blockDate         = selectedBlockDateTime[0].blockDate;
                    var blockTime         = selectedBlockDateTime[0].blockTime;
                    var allowTimeSelected = arrayDiff(blockTime,allowTimes);
                    console.log("allowTimeSelected", allowTimeSelected);

                    if( newCalenderDate == blockDate){

                        if (allowTimeSelected.length === 0) {

                          this.setOptions({
                            disabledDates : blockDate
                          });

                        }else{

                          this.setOptions({
                            allowTimes: allowTimeSelected
                          });
                        }
                    }

                }else{

                  this.setOptions({
                     allowTimes    : allowTimes,
                   });

                }

         }
    });
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda