jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

How to disable mouse wheel on slidebox #467

Closed mukhtar-ali closed 5 years ago

mukhtar-ali commented 5 years ago

My issue is when trying to scroll down on the page and the mouse happens to pass through the slidebox it's spinning and the scroll event happens to it instead of the page

I want to disable it in both month and days

Thanks in advance

jtsage commented 5 years ago

Sorry for the delay - from your report, I'm guessing you are using version 4 of datebox.

Unfortunately, I'm not rolling new features for that version any longer, and have put my time into version 5.

Should you choose to upgrade, there is a new feature as of today called "wheelDisable".

If not, make a copy of the script locally (if you haven't aleady), and search for this bit of code:

if ( typeof $.event.special.mousewheel !== "undefined" ) {
    w.wheelExists = true;
}

If you change that "true" to a "false", the mousewheel events will not bind.

mukhtar-ali commented 5 years ago

@jtsage Thank you for your kind replay, most appreciated it 👍 I'll try it for sure and thanks for the awesome plugin.

jtsage commented 5 years ago

Re Version 5.1.1, SHA: df7153a30ca96dfada0b8ad300e879cf7b63a9b6

jtsage commented 5 years ago

Fix pushed to release, SHA: df7153a30ca96dfada0b8ad300e879cf7b63a9b6 (5.1.1)

(already superseded by 5.1.2, but adding here for historical purposes.)

Closing issue, if this comes back, or I missed something, feel free to re-open.