@syncfusion/ej2-inputs 26.1.38 → 26.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +27 -5
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +27 -5
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/form-validator/form-validator.d.ts +4 -0
- package/src/form-validator/form-validator.js +22 -3
- package/src/input/input.js +4 -1
- package/src/uploader/uploader.js +1 -1
- package/styles/color-picker/fluent2.css +5 -5
- package/styles/data-form/fluent2.css +5 -5
- package/styles/fluent2.css +5 -5
- package/styles/input/_tailwind-definition.scss +1 -1
- package/styles/input/fluent2.css +5 -5
- package/styles/input/tailwind-dark.css +1 -1
- package/styles/input/tailwind.css +1 -1
- package/styles/maskedtextbox/fluent2.css +5 -5
- package/styles/numerictextbox/fluent2.css +5 -5
- package/styles/otp-input/fluent2.css +5 -5
- package/styles/rating/fluent2.css +5 -5
- package/styles/signature/fluent2.css +5 -5
- package/styles/slider/fluent2.css +5 -5
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
- package/styles/textarea/fluent2.css +5 -5
- package/styles/textbox/fluent2.css +5 -5
- package/styles/uploader/fluent2.css +5 -5
|
@@ -458,6 +458,9 @@ var Input;
|
|
|
458
458
|
unwireFloatingEvents(args.element);
|
|
459
459
|
if (!isNullOrUndefined(args.element)) {
|
|
460
460
|
delete args.element.__eventHandlers;
|
|
461
|
+
if (args.element.classList.contains(CLASSNAMES.INPUT)) {
|
|
462
|
+
args.element.classList.remove(CLASSNAMES.INPUT);
|
|
463
|
+
}
|
|
461
464
|
}
|
|
462
465
|
}
|
|
463
466
|
Input.destroy = destroy;
|
|
@@ -608,7 +611,7 @@ var Input;
|
|
|
608
611
|
if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
|
|
609
612
|
if (!isNullOrUndefined(placeholder) && placeholder !== '') {
|
|
610
613
|
var floatTextContent = parentElement.getElementsByClassName('e-float-text-content')[0];
|
|
611
|
-
if (floatTextContent) {
|
|
614
|
+
if (floatTextContent && floatTextContent.children[0]) {
|
|
612
615
|
floatTextContent.children[0].textContent = placeholder;
|
|
613
616
|
}
|
|
614
617
|
else {
|
|
@@ -7917,7 +7920,8 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
7917
7920
|
var params = this.rules["" + name]["" + rule];
|
|
7918
7921
|
var param = (params instanceof Array && typeof params[1] === 'string') ? params[0] : params;
|
|
7919
7922
|
var currentRule = this.rules["" + name]["" + rule];
|
|
7920
|
-
var
|
|
7923
|
+
var dateFormat = ((rule === 'min' || rule === 'max') && this.rules["" + name].date && typeof (this.rules["" + name].date) === 'string') ? this.rules["" + name].date : null;
|
|
7924
|
+
var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
|
|
7921
7925
|
this.trigger('validationBegin', args);
|
|
7922
7926
|
if (!args.param && rule === 'required') {
|
|
7923
7927
|
return true;
|
|
@@ -8114,7 +8118,16 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8114
8118
|
return +option.value <= +option.param;
|
|
8115
8119
|
}
|
|
8116
8120
|
// Maximum rule validation for date
|
|
8117
|
-
|
|
8121
|
+
if (option.format && option.format !== '') {
|
|
8122
|
+
var globalize = new Internationalization;
|
|
8123
|
+
var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8124
|
+
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8125
|
+
var maxValue = globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions);
|
|
8126
|
+
return new Date(dateValue).getTime() <= new Date(maxValue).getTime();
|
|
8127
|
+
}
|
|
8128
|
+
else {
|
|
8129
|
+
return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
|
|
8130
|
+
}
|
|
8118
8131
|
},
|
|
8119
8132
|
min: function (option) {
|
|
8120
8133
|
if (!isNaN(Number(option.value))) {
|
|
@@ -8127,7 +8140,16 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8127
8140
|
}
|
|
8128
8141
|
else {
|
|
8129
8142
|
// Minimum rule validation for date
|
|
8130
|
-
|
|
8143
|
+
if (option.format && option.format !== '') {
|
|
8144
|
+
var globalize = new Internationalization;
|
|
8145
|
+
var dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8146
|
+
var dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8147
|
+
var minValue = globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions);
|
|
8148
|
+
return new Date(dateValue).getTime() >= new Date(minValue).getTime();
|
|
8149
|
+
}
|
|
8150
|
+
else {
|
|
8151
|
+
return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
|
|
8152
|
+
}
|
|
8131
8153
|
}
|
|
8132
8154
|
},
|
|
8133
8155
|
regex: function (option) {
|
|
@@ -10344,7 +10366,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
10344
10366
|
}
|
|
10345
10367
|
this.trigger('success', args, function (args) {
|
|
10346
10368
|
_this.updateStatus(file, args.statusText, '2');
|
|
10347
|
-
_this.uploadedFilesData.push(file);
|
|
10369
|
+
_this.multiple ? _this.uploadedFilesData.push(file) : _this.uploadedFilesData = [file];
|
|
10348
10370
|
_this.trigger('change', { file: _this.uploadedFilesData });
|
|
10349
10371
|
_this.checkActionButtonStatus();
|
|
10350
10372
|
if (_this.fileList.length > 0) {
|