Fix date field being parsed with a timezone (#10033)

* Fix date field being parsed with a timezone

Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>

* send YYYY-MM-DD format instead or 2021-04-27T15:01:09.155Z

* Revert "Fix date field being parsed with a timezone"

This reverts commit 498180477bf1750aa177a27786cc9b4e873c4e95.

Co-authored-by: Pierre Noël <petersg83@gmail.com>
This commit is contained in:
DMehaffy 2021-05-11 00:26:35 -07:00 committed by GitHub
parent 2d8d3fdc06
commit e547b11b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,9 @@ const cleanData = (retrievedData, currentSchema, componentsSchema) => {
break;
case 'date':
cleanedData =
value && value._isAMomentObject === true ? value.format('YYYY-MM-DD') : value;
break;
case 'datetime':
cleanedData = value && value._isAMomentObject === true ? value.toISOString() : value;
break;