I'm getting a Date from GraphQl query. When I get the result, it is coming as 20200415T123050Z.
If I try to format using
<DateField field={item.publishDate} render={(date) => date.toLocaleDateString()} />
(tried it with dateOptions as well ) it says "Invalid Date" on the page.
Is there a way to format the date in GraphQL or after I have received the searchResult?
Thanks