mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-12-08 05:34: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
|
||||
.off('blur.xdsoft')
|
||||
.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);
|
||||
datetimepicker.data('xdsoft_datetime').empty();
|
||||
} else if (!dateHelper.parseDate($(this).val(), options.format)) {
|
||||
|
Loading…
Reference in New Issue
Block a user