mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Merge pull request #1 from monosolutions/type-deprecation
Fixed jQuery migration plugin deprecation warning for use of .type()
This commit is contained in:
commit
207047515b
@ -2411,7 +2411,7 @@ var datetimepickerFactory = function ($) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($.type(options.mask) === 'string') {
|
||||
if (typeof options.mask === 'string') {
|
||||
if (!isValidValue(options.mask, input.val())) {
|
||||
input.val(options.mask.replace(/[0-9]/g, '_'));
|
||||
setCaretPos(input[0], 0);
|
||||
@ -2644,7 +2644,7 @@ var datetimepickerFactory = function ($) {
|
||||
this.each(function () {
|
||||
var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
|
||||
if (datetimepicker) {
|
||||
if ($.type(opt) === 'string') {
|
||||
if (typeof opt === 'string') {
|
||||
switch (opt) {
|
||||
case 'show':
|
||||
$(this).select().focus();
|
||||
@ -2681,7 +2681,7 @@ var datetimepickerFactory = function ($) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if ($.type(opt) !== 'string') {
|
||||
if (typeof opt !== 'string') {
|
||||
if (!options.lazyInit || options.open || options.inline) {
|
||||
createDateTimePicker($(this));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user