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

Error "Cannot read property 'contains' of undefined" is thrown in a page without any calendar #437

Open
MiguelAngel82 opened this issue May 7, 2018 · 3 comments

Comments

@MiguelAngel82
Copy link

Hello all,

I'm using the daterangepicker (last version) in a Grails application. This library has been added to a main JS file, named as application.js. This file is used by Asset Pipeline plugin and requires jQuery and moment before using daterangepicker. This file is also loaded in the bottom of the page.

When the main view of the app is loaded, this error is thrown, when you clicked in some page area:

jquery.daterangepicker.js?compile=false:5565 Uncaught TypeError: Cannot read property 'contains' of undefined
    at IsOwnDatePickerClicked (jquery.daterangepicker.js?compile=false:5565)
    at HTMLDocument.outsideClickClose (jquery.daterangepicker.js?compile=false:7113)
    at HTMLDocument.dispatch (jquery-2.2.0.min.js?compile=false:3)
    at HTMLDocument.r.handle (jquery-2.2.0.min.js?compile=false:3)

Maybe is a problem in load order or something similar.

Any help is appreciate :)

Thank you.

Regards,
Miguel.

@ArjunKishore
Copy link

I am having the same issue. Wondering if you have found any solution?

@mennwebs
Copy link

I'm having this issue, too. Do you have any solution?

@MiguelAngel82
Copy link
Author

Hello @ArjunKishore (sorry for the very late reply) amd @MennStudio.

Sorry but I haven't tried if this issue is still happening. When I tried it, I haven't found any solution.

I'm apologize the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants