Merge pull request #1 from monosolutions/type-deprecation

Fixed jQuery migration plugin deprecation warning for use of .type()
This commit is contained in:
Christopher Lassen 2020-10-12 11:15:25 +02:00 committed by GitHub
commit 207047515b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2411,7 +2411,7 @@ var datetimepickerFactory = function ($) {
} }
} }
if ($.type(options.mask) === 'string') { if (typeof options.mask === 'string') {
if (!isValidValue(options.mask, input.val())) { if (!isValidValue(options.mask, input.val())) {
input.val(options.mask.replace(/[0-9]/g, '_')); input.val(options.mask.replace(/[0-9]/g, '_'));
setCaretPos(input[0], 0); setCaretPos(input[0], 0);
@ -2644,7 +2644,7 @@ var datetimepickerFactory = function ($) {
this.each(function () { this.each(function () {
var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input; var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
if (datetimepicker) { if (datetimepicker) {
if ($.type(opt) === 'string') { if (typeof opt === 'string') {
switch (opt) { switch (opt) {
case 'show': case 'show':
$(this).select().focus(); $(this).select().focus();
@ -2681,7 +2681,7 @@ var datetimepickerFactory = function ($) {
} }
return 0; return 0;
} }
if ($.type(opt) !== 'string') { if (typeof opt !== 'string') {
if (!options.lazyInit || options.open || options.inline) { if (!options.lazyInit || options.open || options.inline) {
createDateTimePicker($(this)); createDateTimePicker($(this));
} else { } else {