Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

205
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda