rez_core 6.1.6 → 6.1.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/package.json
CHANGED
|
@@ -119,9 +119,17 @@ export class ResolverService {
|
|
|
119
119
|
attr.element_type === 'date' ||
|
|
120
120
|
(attr.element_type === 'datetime' && !format_disable)
|
|
121
121
|
) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
// Allow both DD-MM-YYYY and standard ISO YYYY-MM-DD
|
|
123
|
+
const allowedFormats =
|
|
124
|
+
attr.element_type === 'date'
|
|
125
|
+
? ['DD-MM-YYYY', 'YYYY-MM-DD']
|
|
126
|
+
: ['DD-MM-YYYY HH:mm:ss', 'YYYY-MM-DD HH:mm:ss', moment.ISO_8601];
|
|
127
|
+
|
|
128
|
+
// strict parsing enabled
|
|
129
|
+
const dateValue = moment(codeValue, allowedFormats, true).utcOffset(
|
|
130
|
+
'+05:30',
|
|
131
|
+
);
|
|
132
|
+
|
|
125
133
|
if (dateValue.isValid()) {
|
|
126
134
|
resolvedEntityData[field] =
|
|
127
135
|
attr.element_type === 'date'
|