Добавлена возможность оставить пустое поле даты

This commit is contained in:
Andrey Pokidov
2020-02-25 17:37:24 +07:00
parent 9eb6cfb1ec
commit 8fe52a2a19
5 changed files with 20 additions and 12 deletions

View File

@@ -950,7 +950,9 @@ function () {
this._field.addEventListener('blur', function () {
_this.correctValue(true);
_this.returnLastCorrectValue();
if (!_this._isEmptyValue(_this._field.value)) {
_this.returnLastCorrectValue();
}
});
}
}, {
@@ -1005,7 +1007,7 @@ function () {
return;
}
this._setValueToFieled(parsedValue);
this._setValueToField(parsedValue);
}
}, {
key: "setValue",
@@ -1037,8 +1039,8 @@ function () {
return this._formatter.getCorrectedValue();
}
}, {
key: "_setValueToFieled",
value: function _setValueToFieled(newValue) {
key: "_setValueToField",
value: function _setValueToField(newValue) {
var position = this._field.selectionStart;
var isAtEnd = position === this._field.value.length;
this._field.value = newValue;

File diff suppressed because one or more lines are too long