Zebra_Datepicker icon indicating copy to clipboard operation
Zebra_Datepicker copied to clipboard

Fix jQuery 3+ warnings

Open stefankiv opened this issue 3 years ago • 4 comments

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!

stefankiv avatar Jul 09 '21 08:07 stefankiv

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 :)

stefangabos avatar Jul 09 '21 08:07 stefangabos

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

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

stefankiv avatar Jul 09 '21 09:07 stefankiv

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

stefangabos avatar Jul 09 '21 09:07 stefangabos

That sounds even better!

stefankiv avatar Jul 09 '21 09:07 stefankiv

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

stefangabos avatar Sep 28 '23 10:09 stefangabos