datetimepicker scrolls in the reverse direction for timepicker when using the mousewheel

Viewed 177

I am using the jquery datetimepicker plugin provided here and currently facing weird reversed-scroll issue.

I have downloaded the zip from their git repo, run npm install followed by npm run buildand then opened index.html file but somehow the direction of scroll for timepicker is reversed for me and I can't somehow able to figure out why it works so. | In their demo site, it works properly. i.e. clicking on up arrow scrolls down and reveals the content above but for me it works in reverse direction.

enter image description here

So when I mousewheel up, it scrolls down.

1 Answers

Try in line 809 of the file jquery.datetimepicker.full.js:

if ('deltaY' in e) {
  deltaY = -e.deltaY;
}

instead of:

if ('deltaY' in e) {
  deltaY = e.deltaY;
}

This solved the issue for me.

Source: https://github.com/xdan/datetimepicker/issues/763

Related