From 90a29b315efc485d3bdecd117c4aea784cd6a223 Mon Sep 17 00:00:00 2001 From: Xun Yang Date: Sat, 2 Feb 2019 14:13:33 +0100 Subject: [PATCH] Update locale example, clearify date-fns version (#1629) It's confusing because the default date-fns version is not compatible. Added a few lines of comments about how to install the compatible version. --- docs-site/src/examples/locale.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs-site/src/examples/locale.jsx b/docs-site/src/examples/locale.jsx index b2467aa15..35d97ecf9 100644 --- a/docs-site/src/examples/locale.jsx +++ b/docs-site/src/examples/locale.jsx @@ -20,6 +20,12 @@ export default class CustomStartDate extends React.Component {
           
+            {"// Note: Make sure to npm install the right version of date-fns as"}
+            
+ {"// specified in packaged.json. The default one may not be compatiable"} +
+ {"// npm install --save date-fns@version"} +
{"import enGB from 'date-fns/locale/en-GB';"}
{"registerLocale('en-GB', enGB);"}