Skip to content

Commit

Permalink
Update locale example, clearify date-fns version (Hacker0x01#1629)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
X-Y authored and martijnrusschen committed Feb 2, 2019
1 parent a48990f commit 5b98a21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs-site/src/examples/locale.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export default class CustomStartDate extends React.Component {
<div className="row">
<pre className="column example__code">
<code className="jsx">
{"// Note: Make sure to npm install the right version of date-fns as"}
<br />
{"// specified in packaged.json. The default one may not be compatiable"}
<br />
{"// npm install --save date-fns@version"}
<br />
{"import enGB from 'date-fns/locale/en-GB';"}
<br />
{"registerLocale('en-GB', enGB);"}
Expand Down

0 comments on commit 5b98a21

Please sign in to comment.