@sumaris-net/ngx-components 2.6.4-rc1 → 2.6.4-rc3

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,14 +2748,13 @@ 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.length === 10) {
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
- if (dateOnly.isValid())
2755
- return DateUtils.markNoTime(dateOnly);
2754
+ return DateUtils.markNoTime(dateOnly);
2756
2755
  }
2757
2756
  // Parse the input value, as a ISO date time
2758
- const date = DateUtils.moment(value, DATE_ISO_PATTERN, true);
2757
+ const date = DateUtils.moment(value, DATE_ISO_PATTERN);
2759
2758
  if (date.isValid())
2760
2759
  return date;
2761
2760
  // Not valid: trying to convert from unix timestamp