Skip to content

Commit d552f74

Browse files
Merge pull request Hacker0x01#215 from jasongonzales23/patch-1
explain CSS inclusion
2 parents db65265 + 89f672a commit d552f74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ The package has can be installed via:
1515
- NPM: `npm install react-datepicker --save`
1616
- Bundler (rails gem): `bundle install rails-assets-react-date-picker`. This requires to include https://rails-assets.org/ as a source in your gemfile.
1717

18-
You’ll need to install React and Moment.js separate since those dependencies aren’t included in the package. Below is a simple example on how to use the Datepicker in a React view.
18+
You’ll need to install React and Moment.js separate since those dependencies aren’t included in the package. Below is a simple example on how to use the Datepicker in a React view. You will also need to require the css file from this package (or provide your own). The example below shows how to include the css from this package if your build system supports requiring css files (webpack is one that does).
1919

2020
```
2121
var React = require(‘react’);
2222
var DatePicker = require(‘react-datepicker’);
2323
var moment = require(‘moment’);
2424
25+
require('react-datepicker/dist/react-datepicker.css');
26+
2527
var Example = React.createClass({
2628
displayName: ‘Example’,
2729

0 commit comments

Comments
 (0)