@syncfusion/ej2-inputs 26.1.39 → 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 +24 -5
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +24 -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 +1 -1
- package/src/uploader/uploader.js +1 -1
- package/styles/input/_tailwind-definition.scss +1 -1
- package/styles/input/tailwind-dark.css +1 -1
- package/styles/input/tailwind.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -611,7 +611,7 @@ var Input;
|
|
|
611
611
|
if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
|
|
612
612
|
if (!isNullOrUndefined(placeholder) && placeholder !== '') {
|
|
613
613
|
var floatTextContent = parentElement.getElementsByClassName('e-float-text-content')[0];
|
|
614
|
-
if (floatTextContent) {
|
|
614
|
+
if (floatTextContent && floatTextContent.children[0]) {
|
|
615
615
|
floatTextContent.children[0].textContent = placeholder;
|
|
616
616
|
}
|
|
617
617
|
else {
|
|
@@ -7920,7 +7920,8 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
7920
7920
|
var params = this.rules["" + name]["" + rule];
|
|
7921
7921
|
var param = (params instanceof Array && typeof params[1] === 'string') ? params[0] : params;
|
|
7922
7922
|
var currentRule = this.rules["" + name]["" + rule];
|
|
7923
|
-
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 };
|
|
7924
7925
|
this.trigger('validationBegin', args);
|
|
7925
7926
|
if (!args.param && rule === 'required') {
|
|
7926
7927
|
return true;
|
|
@@ -8117,7 +8118,16 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8117
8118
|
return +option.value <= +option.param;
|
|
8118
8119
|
}
|
|
8119
8120
|
// Maximum rule validation for date
|
|
8120
|
-
|
|
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
|
+
}
|
|
8121
8131
|
},
|
|
8122
8132
|
min: function (option) {
|
|
8123
8133
|
if (!isNaN(Number(option.value))) {
|
|
@@ -8130,7 +8140,16 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8130
8140
|
}
|
|
8131
8141
|
else {
|
|
8132
8142
|
// Minimum rule validation for date
|
|
8133
|
-
|
|
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
|
+
}
|
|
8134
8153
|
}
|
|
8135
8154
|
},
|
|
8136
8155
|
regex: function (option) {
|
|
@@ -10347,7 +10366,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
10347
10366
|
}
|
|
10348
10367
|
this.trigger('success', args, function (args) {
|
|
10349
10368
|
_this.updateStatus(file, args.statusText, '2');
|
|
10350
|
-
_this.uploadedFilesData.push(file);
|
|
10369
|
+
_this.multiple ? _this.uploadedFilesData.push(file) : _this.uploadedFilesData = [file];
|
|
10351
10370
|
_this.trigger('change', { file: _this.uploadedFilesData });
|
|
10352
10371
|
_this.checkActionButtonStatus();
|
|
10353
10372
|
if (_this.fileList.length > 0) {
|