xdan / datetimepicker

jQuery Plugin Date and Time Picker
https://xdsoft.net/jqplugins/datetimepicker/
MIT License
3.5k stars 1.52k forks source link

jQuery migration going to 3.5.1 complains about use of specified functions. #761

Closed Abarth77 closed 2 years ago

Abarth77 commented 3 years ago

Checklist before pull request

Fixes

For an upgrade to jQuery 3.5.1, using the migration plugin a couple of errors was thrown when running in QA env. This fork was created in anticipation of an update that would fix this issue, if this is not on the board in the near future we will just keep the fork as a working edition, and this can obviously be ignored, but after these changes, our env. worked with no consoles from the migration plugin.

Related jQuery issues should have been reverted to use native behaviour, however there might edge cases, particularly with the typeof changes, that we didn't think of, so all feedback is of course welcome.

$.isFunction() => typeof X === ‘function’
 https://api.jquery.com/jquery.isfunction/

$.isArray() => Array.isArray() https://api.jquery.com/jQuery.isArray/#jQuery-isArray-obj

$.type() => typeof X === ‘string’ https://api.jquery.com/jQuery.type/#jQuery-type-obj

$.trim(val) => val.trim() https://api.jquery.com/jQuery.trim/#entry-examples