Bug report
Describe the bug
I'm trying to display dates depend on local, and for that, I'm using toLocaleDateString()
API
i would like to know how to fix this console error.
To Reproduce
class Review extends React.Component {
render() {
const { review, theme } = this.props;
const componentStyle = theme.components.review;
const reviewDate = new Date(review.date);
const date = reviewDate.toLocaleDateString('de-DE');
return (
<React.Fragment>
<time dateTime={date}>{date}</time> <Seprator>{review.name ? '|' : ''}</Seprator>{' '}
<span>{review.name}</span>
<RatingBar rating={review.rating} />
<H4 margin={`${componentStyle.title.marginTop} 0 ${componentStyle.title.marginBottom} 0`}>
{review.title}
</H4>
<Paragraph>{review.text}</Paragraph>
</React.Fragment>
);
}
}
Screenshots
