Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!