Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/features/form/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function createObs(val, path, concept, formId, orderUuid, existingObsFlattened)
// If the value is a date, re-format so it is compatible with date (yyyy-MM-dd) and datetime (yyyy-MM-dd HH:mm) formats expected by REST module
// Really this seems like something that should be fixed in the REST module, but doing it here to keep changes contained
// We don't have any access to concept metadata at this point, and so we are just hacking in an array of DATETIME_CONCEPTS that should use this handling
const dateTimeRegex = new RegExp("^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}-[0-9]{2}:[0-9]{2})$");
const dateTimeRegex = new RegExp("^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}[-,+][0-9]{2}:[0-9]{2})$");
if (dateTimeRegex.test(val)) {
if (DATETIME_CONCEPTS.indexOf(concept) !== -1) {
val = val.substring(0, 16).replace("T", " ");
Expand Down
Loading