@itfin/components 1.2.26 → 1.2.27
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/package.json
CHANGED
|
@@ -142,7 +142,7 @@ export function dateBeforeValidation (dateCompare, message) {
|
|
|
142
142
|
const d1 = DateTime.fromFormat(v, STANDART_DATE_FORMAT).startOf('day');
|
|
143
143
|
const d2 = DateTime.fromFormat(dateCompare, STANDART_DATE_FORMAT).startOf('day');
|
|
144
144
|
|
|
145
|
-
return d1 < d2 || (message || $t('
|
|
145
|
+
return d1 < d2 || (message || $t('components.dateBefore', { date: formatDate(dateCompare) }));
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -154,7 +154,7 @@ export function dateAfterValidation (dateCompare, message) {
|
|
|
154
154
|
const d1 = DateTime.fromFormat(v, STANDART_DATE_FORMAT).startOf('day');
|
|
155
155
|
const d2 = DateTime.fromFormat(dateCompare, STANDART_DATE_FORMAT).startOf('day');
|
|
156
156
|
|
|
157
|
-
return d1 > d2 || (message || $t('
|
|
157
|
+
return d1 > d2 || (message || $t('components.dateAfter', { date: formatDate(dateCompare) }));
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -166,7 +166,7 @@ export function dateSameOrAfterValidation (dateCompare, message) {
|
|
|
166
166
|
const d1 = DateTime.fromFormat(v, STANDART_DATE_FORMAT).startOf('day');
|
|
167
167
|
const d2 = DateTime.fromFormat(dateCompare, STANDART_DATE_FORMAT).startOf('day');
|
|
168
168
|
|
|
169
|
-
return d1 >= d2 || (message || $t('
|
|
169
|
+
return d1 >= d2 || (message || $t('components.dateSameOrAfter', { date: formatDate(dateCompare) }));
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -178,6 +178,6 @@ export function dateSameOrBeforeValidation (dateCompare, message) {
|
|
|
178
178
|
const d1 = DateTime.fromFormat(v, STANDART_DATE_FORMAT).startOf('day');
|
|
179
179
|
const d2 = DateTime.fromFormat(dateCompare, STANDART_DATE_FORMAT).startOf('day');
|
|
180
180
|
|
|
181
|
-
return d1 <= d2 || (message || $t('
|
|
181
|
+
return d1 <= d2 || (message || $t('components.dateSameOrBefore', { date: formatDate(dateCompare) }));
|
|
182
182
|
};
|
|
183
183
|
}
|