@formio/js 5.0.0-dev.5760.9e85e8c → 5.0.0-dev.5760.f9aca2e
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.
|
@@ -565,13 +565,10 @@ class DayComponent extends Field_1.default {
|
|
|
565
565
|
}
|
|
566
566
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
567
567
|
const values = value.split('/');
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
values[DAY] === '' ||
|
|
573
|
-
values[MONTH] === '' ||
|
|
574
|
-
values[YEAR] === '');
|
|
568
|
+
if (values.length < 3) {
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
571
|
+
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
575
572
|
}
|
|
576
573
|
getValidationFormat() {
|
|
577
574
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -561,13 +561,10 @@ export default class DayComponent extends Field {
|
|
|
561
561
|
}
|
|
562
562
|
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
563
563
|
const values = value.split('/');
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
values[DAY] === '' ||
|
|
569
|
-
values[MONTH] === '' ||
|
|
570
|
-
values[YEAR] === '');
|
|
564
|
+
if (values.length < 3) {
|
|
565
|
+
return true;
|
|
566
|
+
}
|
|
567
|
+
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
571
568
|
}
|
|
572
569
|
getValidationFormat() {
|
|
573
570
|
let validationFormat = this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';
|