Skip to content

Commit

Permalink
bug fix for date previous-value display (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
arodidev authored Apr 15, 2024
1 parent 7ddb9f1 commit d585498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/section/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function previousValueDisplayForCheckbox(previosValueItems: Object[]): String {
export const formatPreviousValueDisplayText = (question: OHRIFormField, value: any) => {
switch (question.questionOptions.rendering) {
case 'date':
return formatDate(value);
return formatDate(new Date(value?.display));
case 'checkbox':
return Array.isArray(value) ? previousValueDisplayForCheckbox(value) : null;
default:
Expand Down

0 comments on commit d585498

Please sign in to comment.