diff --git a/app/components/Review/ReviewTheme.tsx b/app/components/Review/ReviewTheme.tsx index d4fdc7b6d9..8cc5befb9e 100644 --- a/app/components/Review/ReviewTheme.tsx +++ b/app/components/Review/ReviewTheme.tsx @@ -10,6 +10,7 @@ import DefaultWidget from './widgets/DefaultWidget'; import MoneyWidget from './widgets/MoneyWidget'; import BooleanWidget from './widgets/BooleanWidget'; import FileWidget from './widgets/FileWidget'; +import DateWidget from './widgets/DateWidget'; const { templates } = getDefaultRegistry(); @@ -36,6 +37,7 @@ const ReviewTheme: ThemeProps = { ReadOnlyWidget: DefaultWidget, ReadOnlyProjectAreaWidget: DefaultWidget, ReadOnlyProjectAreaWidgetIntakeFour: DefaultWidget, + DateWidget, }, templates: { ...templates, diff --git a/app/components/Review/widgets/DateWidget.tsx b/app/components/Review/widgets/DateWidget.tsx new file mode 100644 index 0000000000..3022897120 --- /dev/null +++ b/app/components/Review/widgets/DateWidget.tsx @@ -0,0 +1,8 @@ +import { WidgetProps } from '@rjsf/utils'; + +const DateWidget: React.FC = ({ value }) => { + const date = value?.toString().split('T')[0]; + return <>{date}; +}; + +export default DateWidget;