@sumaris-net/ngx-components 1.18.4 → 1.18.7
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/bundles/sumaris-net.ngx-components.umd.js +7 -4
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +6 -0
- package/esm2015/src/app/shared/dates.js +3 -3
- package/esm2015/src/app/shared/pipes/date-format.pipe.js +6 -3
- package/fesm2015/sumaris-net.ngx-components.js +7 -4
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/pipes/date-format.pipe.d.ts +3 -2
- package/src/theme/_ngx-components.scss +5 -5
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -2261,8 +2261,11 @@
|
|
|
2261
2261
|
var date = momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, DATE_ISO_PATTERN);
|
|
2262
2262
|
return date && this.dateAdapter.format(date, pattern) || '';
|
|
2263
2263
|
};
|
|
2264
|
-
DateFormatPipe.prototype.format = function (date,
|
|
2265
|
-
return this.dateAdapter.format(date,
|
|
2264
|
+
DateFormatPipe.prototype.format = function (date, pattern) {
|
|
2265
|
+
return this.dateAdapter.format(date, pattern);
|
|
2266
|
+
};
|
|
2267
|
+
DateFormatPipe.prototype.parse = function (value, parseFormat) {
|
|
2268
|
+
return momentImported.isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
2266
2269
|
};
|
|
2267
2270
|
return DateFormatPipe;
|
|
2268
2271
|
}());
|
|
@@ -2769,10 +2772,10 @@
|
|
|
2769
2772
|
this.toDuration = toDuration;
|
|
2770
2773
|
}
|
|
2771
2774
|
DateUtils.min = function (date1, date2) {
|
|
2772
|
-
return date1 && date2
|
|
2775
|
+
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2773
2776
|
};
|
|
2774
2777
|
DateUtils.max = function (date1, date2) {
|
|
2775
|
-
return
|
|
2778
|
+
return date1 && (!date2 || date1.isSameOrAfter(date2)) ? date1 : date2;
|
|
2776
2779
|
};
|
|
2777
2780
|
DateUtils.equals = function (date1, date2) {
|
|
2778
2781
|
return DateUtils.isSame(date1, date2);
|