mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Fresh build
This commit is contained in:
parent
1a685952f6
commit
d2ba49d54d
@ -1319,8 +1319,8 @@ var datetimepickerFactory = function ($) {
|
|||||||
input
|
input
|
||||||
.off('blur.xdsoft')
|
.off('blur.xdsoft')
|
||||||
.on('blur.xdsoft', function () {
|
.on('blur.xdsoft', function () {
|
||||||
if (options.allowBlank && (!$.trim($(this).val()).length ||
|
if (options.allowBlank && (!$(this).val().trim().length ||
|
||||||
(typeof options.mask === "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
|
(typeof options.mask === "string" && $(this).val().trim() === options.mask.replace(/[0-9]/g, '_')))) {
|
||||||
$(this).val(null);
|
$(this).val(null);
|
||||||
datetimepicker.data('xdsoft_datetime').empty();
|
datetimepicker.data('xdsoft_datetime').empty();
|
||||||
} else {
|
} else {
|
||||||
@ -2454,7 +2454,7 @@ var datetimepickerFactory = function ($) {
|
|||||||
if (isValidValue(options.mask, val)) {
|
if (isValidValue(options.mask, val)) {
|
||||||
this.value = val;
|
this.value = val;
|
||||||
setCaretPos(this, pos);
|
setCaretPos(this, pos);
|
||||||
} else if ($.trim(val) === '') {
|
} else if (val.trim() === '') {
|
||||||
this.value = options.mask.replace(/[0-9]/g, '_');
|
this.value = options.mask.replace(/[0-9]/g, '_');
|
||||||
} else {
|
} else {
|
||||||
input.trigger('error_input.xdsoft');
|
input.trigger('error_input.xdsoft');
|
||||||
@ -2534,7 +2534,7 @@ var datetimepickerFactory = function ($) {
|
|||||||
val = valueBeforeCursor + insertChar + valueAfterNextChar
|
val = valueBeforeCursor + insertChar + valueAfterNextChar
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.trim(val) === '') {
|
if (val.trim() === '') {
|
||||||
// if empty, set to default
|
// if empty, set to default
|
||||||
val = defaultBlank
|
val = defaultBlank
|
||||||
} else {
|
} else {
|
||||||
@ -2555,7 +2555,7 @@ var datetimepickerFactory = function ($) {
|
|||||||
if (isValidValue(options.mask, val)) {
|
if (isValidValue(options.mask, val)) {
|
||||||
this.value = val;
|
this.value = val;
|
||||||
setCaretPos(this, pos);
|
setCaretPos(this, pos);
|
||||||
} else if ($.trim(val) === '') {
|
} else if (val.trim() === '') {
|
||||||
this.value = options.mask.replace(/[0-9]/g, '_');
|
this.value = options.mask.replace(/[0-9]/g, '_');
|
||||||
} else {
|
} else {
|
||||||
input.trigger('error_input.xdsoft');
|
input.trigger('error_input.xdsoft');
|
||||||
|
2
build/jquery.datetimepicker.full.min.js
vendored
2
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.js
vendored
2
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user