Skip to content

Commit 2d59a95

Browse files
Revert "Don't pre-format dates"
This reverts commit 69f9911.
1 parent 69f9911 commit 2d59a95

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/View.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,20 @@ const View = ({ data, id, path }) => {
195195
const isAttachment = config.blocks.blocksConfig.form.attachment_fields.includes(
196196
subblock.field_type,
197197
);
198+
const isDate = subblock.field_type === 'date';
198199

199200
if (isAttachment) {
200201
attachments[name] = formattedFormData[name].value;
201202
delete formattedFormData[name];
202203
}
204+
205+
if (isDate) {
206+
formattedFormData[name].value = formatDate({
207+
date: formattedFormData[name].value,
208+
format: 'DD-MM-YYYY',
209+
locale: intl.locale,
210+
});
211+
}
203212
}
204213
});
205214
dispatch(

0 commit comments

Comments
 (0)