taxtank-core 0.28.2 → 0.28.3
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.
|
@@ -16954,7 +16954,11 @@
|
|
|
16954
16954
|
function minDateValidator(date, message) {
|
|
16955
16955
|
if (message === void 0) { message = MessagesEnum.INVALID_DATE.replace('$1', new i1$1.DatePipe('en-US').transform(date)); }
|
|
16956
16956
|
return function (control) {
|
|
16957
|
-
if (!control.value
|
|
16957
|
+
if (!control.value) {
|
|
16958
|
+
return null;
|
|
16959
|
+
}
|
|
16960
|
+
// form control value can be as a Moment object - we wrap it in "new Date()" to work with it like with JS Date
|
|
16961
|
+
if (new Date(control.value) >= new Date(date)) {
|
|
16958
16962
|
return null;
|
|
16959
16963
|
}
|
|
16960
16964
|
return { minDate: message };
|