@sumaris-net/ngx-components 2.6.4-rc1 → 2.6.4-rc2
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.
|
@@ -2748,11 +2748,10 @@ function fromDateISOString(value) {
|
|
|
2748
2748
|
// Already a moment object: use it
|
|
2749
2749
|
if (!value || isMoment(value))
|
|
2750
2750
|
return value;
|
|
2751
|
-
if (typeof value === 'string' && value.
|
|
2751
|
+
if (typeof value === 'string' && !!value.match(/^\d+[-/]\d+[-/]\d+$/g)) {
|
|
2752
2752
|
// Parse the input value, as a date only
|
|
2753
2753
|
const dateOnly = DateUtils.moment(value, DATE_PATTERN, true);
|
|
2754
|
-
|
|
2755
|
-
return DateUtils.markNoTime(dateOnly);
|
|
2754
|
+
return DateUtils.markNoTime(dateOnly);
|
|
2756
2755
|
}
|
|
2757
2756
|
// Parse the input value, as a ISO date time
|
|
2758
2757
|
const date = DateUtils.moment(value, DATE_ISO_PATTERN, true);
|