@ng-formworks/core 19.5.1 → 19.5.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.
|
@@ -5106,23 +5106,24 @@ function formatFormData(formData, dataMap, recursiveRefMap, arrayMap, returnEmpt
|
|
|
5106
5106
|
JsonPointer.set(formattedData, dataPointer, newValue);
|
|
5107
5107
|
}
|
|
5108
5108
|
}
|
|
5109
|
+
// commented out completely as value can be 'null' if not entered
|
|
5109
5110
|
// Finish incomplete 'date-time' entries
|
|
5110
|
-
if (dataMap.get(genericPointer).get('schemaFormat') === 'date-time') {
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
}
|
|
5111
|
+
// if (dataMap.get(genericPointer).get('schemaFormat') === 'date-time') {
|
|
5112
|
+
// /* commented out-should use same format as datetime-local input
|
|
5113
|
+
// for initial data to bind back to the input
|
|
5114
|
+
// // "2000-03-14T01:59:26.535" -> "2000-03-14T01:59:26.535Z" (add "Z")
|
|
5115
|
+
// if (/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?$/i.test(value)) {
|
|
5116
|
+
// JsonPointer.set(formattedData, dataPointer, `${value}Z`);
|
|
5117
|
+
// // "2000-03-14T01:59" -> "2000-03-14T01:59:00Z" (add ":00Z")
|
|
5118
|
+
// } else if (/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d$/i.test(value)) {
|
|
5119
|
+
// JsonPointer.set(formattedData, dataPointer, `${value}:00Z`);
|
|
5120
|
+
// // "2000-03-14" -> "2000-03-14T00:00:00Z" (add "T00:00:00Z")
|
|
5121
|
+
// } else if (fixErrors && /^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(value)) {
|
|
5122
|
+
// JsonPointer.set(formattedData, dataPointer, `${value}:00:00:00Z`);
|
|
5123
|
+
// }
|
|
5124
|
+
// */
|
|
5125
|
+
// JsonPointer.set(formattedData, dataPointer, `${value}`);
|
|
5126
|
+
// }
|
|
5126
5127
|
}
|
|
5127
5128
|
else if (typeof value !== 'object' || isDate(value) ||
|
|
5128
5129
|
(value === null && returnEmptyFields)) {
|