'datetimepicker scrolls in the reverse direction for timepicker when using the mousewheel
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 build
and 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.
So when I mousewheel up, it scrolls down.
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Tyler2P |