mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Merge pull request #417 from Sibz/Sibz-patch-mask-exception
Fix exception when mask isn't set or is false.
This commit is contained in:
commit
ab609606f9
@ -1176,7 +1176,7 @@
|
|||||||
input
|
input
|
||||||
.off('blur.xdsoft')
|
.off('blur.xdsoft')
|
||||||
.on('blur.xdsoft', function () {
|
.on('blur.xdsoft', function () {
|
||||||
if (options.allowBlank && (!$.trim($(this).val()).length || $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_'))) {
|
if (options.allowBlank && (!$.trim($(this).val()).length || (typeof options.mask == "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
|
||||||
$(this).val(null);
|
$(this).val(null);
|
||||||
datetimepicker.data('xdsoft_datetime').empty();
|
datetimepicker.data('xdsoft_datetime').empty();
|
||||||
} else if (!dateHelper.parseDate($(this).val(), options.format)) {
|
} else if (!dateHelper.parseDate($(this).val(), options.format)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user