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

Fix jQuery 3+ warnings #178

Closed
stefankiv opened this issue Jul 9, 2021 · 5 comments
Closed

Fix jQuery 3+ warnings #178

stefankiv opened this issue Jul 9, 2021 · 5 comments
Assignees

Comments

@stefankiv
Copy link

When using datepicker with jQuery 3+, jquery-migrate prints several warnings about deprecations in the code:

  • JQMIGRATE: jQuery.fn.removeAttr no longer sets boolean properties: readonly (src)
    Possible solution: replace $element.removeAttr('readonly'); with $element.prop('readonly', false); (src)
  • JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray (29 occurrences, like this)
    Possible solution: replace all $.isArray with Array.isArray (src)
  • JQMIGRATE: jQuery.trim is deprecated; use String.prototype.trim (5 occurrences, like)
    Possible solution: replace all $.trim with text.trim() or String.prototype.trim.call( text == null ? '' : text ) (src)
  • JQMIGRATE: jQuery.fn.mousedown() event shorthand is deprecated (src)
    Possible solution: replace el.mousedown(function() {...}) with el.on('mousedown', function() {...}) (src)

Thanks in advance!

@stefangabos
Copy link
Owner

This library is compatible with IE 6 :)
Therefore, the only thing that I could change is the mousedown related issue
I was thinking about letting IE6 go but I don't think I am ready yet :)

@stefankiv
Copy link
Author

Ahh.. Sometimes you just have to let it go, you know 😅

Nevertheless, somehow I missed that, thank you for quick reply!

@stefangabos
Copy link
Owner

I thought more about it and I will make a release next week from which I will be removing the IE6 related things

@stefankiv
Copy link
Author

That sounds even better!

@stefangabos
Copy link
Owner

better later than never! :)
stefankiv thanks for your input on this!

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

No branches or pull requests

2 participants