@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
|
@@ -455,6 +455,9 @@ var Input;
|
|
|
455
455
|
unwireFloatingEvents(args.element);
|
|
456
456
|
if (!isNullOrUndefined(args.element)) {
|
|
457
457
|
delete args.element.__eventHandlers;
|
|
458
|
+
if (args.element.classList.contains(CLASSNAMES.INPUT)) {
|
|
459
|
+
args.element.classList.remove(CLASSNAMES.INPUT);
|
|
460
|
+
}
|
|
458
461
|
}
|
|
459
462
|
}
|
|
460
463
|
Input.destroy = destroy;
|
|
@@ -605,7 +608,7 @@ var Input;
|
|
|
605
608
|
if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
|
|
606
609
|
if (!isNullOrUndefined(placeholder) && placeholder !== '') {
|
|
607
610
|
const floatTextContent = parentElement.getElementsByClassName('e-float-text-content')[0];
|
|
608
|
-
if (floatTextContent) {
|
|
611
|
+
if (floatTextContent && floatTextContent.children[0]) {
|
|
609
612
|
floatTextContent.children[0].textContent = placeholder;
|
|
610
613
|
}
|
|
611
614
|
else {
|
|
@@ -7778,7 +7781,8 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
|
|
|
7778
7781
|
const params = this.rules[`${name}`][`${rule}`];
|
|
7779
7782
|
const param = (params instanceof Array && typeof params[1] === 'string') ? params[0] : params;
|
|
7780
7783
|
const currentRule = this.rules[`${name}`][`${rule}`];
|
|
7781
|
-
const
|
|
7784
|
+
const dateFormat = ((rule === 'min' || rule === 'max') && this.rules["" + name].date && typeof (this.rules["" + name].date) === 'string') ? this.rules["" + name].date : null;
|
|
7785
|
+
const args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element, format: dateFormat };
|
|
7782
7786
|
this.trigger('validationBegin', args);
|
|
7783
7787
|
if (!args.param && rule === 'required') {
|
|
7784
7788
|
return true;
|
|
@@ -7975,7 +7979,16 @@ FormValidator.checkValidator = {
|
|
|
7975
7979
|
return +option.value <= +option.param;
|
|
7976
7980
|
}
|
|
7977
7981
|
// Maximum rule validation for date
|
|
7978
|
-
|
|
7982
|
+
if (option.format && option.format !== '') {
|
|
7983
|
+
const globalize = new Internationalization;
|
|
7984
|
+
const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
7985
|
+
const dateValue = globalize.parseDate(option.value, dateOptions);
|
|
7986
|
+
const maxValue = globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions);
|
|
7987
|
+
return new Date(dateValue).getTime() <= new Date(maxValue).getTime();
|
|
7988
|
+
}
|
|
7989
|
+
else {
|
|
7990
|
+
return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
|
|
7991
|
+
}
|
|
7979
7992
|
},
|
|
7980
7993
|
min: (option) => {
|
|
7981
7994
|
if (!isNaN(Number(option.value))) {
|
|
@@ -7988,7 +8001,16 @@ FormValidator.checkValidator = {
|
|
|
7988
8001
|
}
|
|
7989
8002
|
else {
|
|
7990
8003
|
// Minimum rule validation for date
|
|
7991
|
-
|
|
8004
|
+
if (option.format && option.format !== '') {
|
|
8005
|
+
const globalize = new Internationalization;
|
|
8006
|
+
const dateOptions = { format: option.format.toString(), type: 'dateTime', skeleton: 'yMd' };
|
|
8007
|
+
const dateValue = globalize.parseDate(option.value, dateOptions);
|
|
8008
|
+
const minValue = globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions);
|
|
8009
|
+
return new Date(dateValue).getTime() >= new Date(minValue).getTime();
|
|
8010
|
+
}
|
|
8011
|
+
else {
|
|
8012
|
+
return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
|
|
8013
|
+
}
|
|
7992
8014
|
}
|
|
7993
8015
|
},
|
|
7994
8016
|
regex: (option) => {
|
|
@@ -10137,7 +10159,7 @@ let Uploader = class Uploader extends Component {
|
|
|
10137
10159
|
}
|
|
10138
10160
|
this.trigger('success', args, (args) => {
|
|
10139
10161
|
this.updateStatus(file, args.statusText, '2');
|
|
10140
|
-
this.uploadedFilesData.push(file);
|
|
10162
|
+
this.multiple ? this.uploadedFilesData.push(file) : this.uploadedFilesData = [file];
|
|
10141
10163
|
this.trigger('change', { file: this.uploadedFilesData });
|
|
10142
10164
|
this.checkActionButtonStatus();
|
|
10143
10165
|
if (this.fileList.length > 0) {
|