Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datePicker.bind() accepts a selector, but it isn't used #138

Closed
litzinger opened this issue Feb 27, 2019 · 2 comments
Closed

datePicker.bind() accepts a selector, but it isn't used #138

litzinger opened this issue Feb 27, 2019 · 2 comments
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Comments

@litzinger
Copy link
Contributor

Description of the problem
The date_picker.js file has a bind() function that accepts a variable named "elements", but it is unused:

In various parts of the code, such as a few lines down from line 395, it passes a jQuery selector under the assumption that it is used, but it is not.

This should be refactored to be:

elements.on('focus', function() {

Or better yet:

if (!(elements instanceof jQuery)) {
    return;
}

elements.on('focus', function() {
@kevincupp kevincupp added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label Feb 28, 2019
@kevincupp
Copy link
Contributor

Oops! Thanks for the catch. I'll copy and paste this over for you, but consider opening a PR if you know the fix.

@litzinger
Copy link
Contributor Author

I thought about the PR, but I don't know if my change would have adverse side effects elsewhere, and I didn't have time to do thorough testing, so I just threw out there what looked like the fix would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.
Projects
None yet
Development

No branches or pull requests

2 participants