Skip to content

Commit

Permalink
Fixing a minor issue in date auto generation
Browse files Browse the repository at this point in the history
Signed-off-by: Dhananjaya Rajasinghe <[email protected]>
  • Loading branch information
DhananjayaR committed Feb 17, 2023
1 parent ef381d7 commit bfa9eff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export class FixForm extends React.Component<FixFormProps, FixFormState> {
case 'monthyear':
case 'utcdateonly':
case 'utctimeonly':
value = value?.toISOString();
if (typeof value === "object") {
value = value?.toISOString();
}
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ export class FixHeaderForm extends React.Component<FixHeaderFormProps, FixHeader
const properties = Object.keys(inputData)
const filteredProperties = properties.filter(property => property.indexOf(`${namePrefix}__${name}__${fieldIterationIndex}`) > -1)
filteredProperties.forEach(property => {
let value = inputData[property]
let value = inputData[property];
switch (field.def.type.toLowerCase()) {
case "utctimestamp":
case 'monthyear':
case 'utcdateonly':
case 'utctimeonly':
value = value?.toISOString();
if (typeof value === "object") {
value = value?.toISOString();
}
break;
}

Expand Down

0 comments on commit bfa9eff

Please sign in to comment.