Package Exports
- react-datepicker
- react-datepicker/dist/react-datepicker
- react-datepicker/dist/react-datepicker.css
- react-datepicker/dist/react-datepicker.min.css
- react-datepicker/src/stylesheets/datepicker.scss
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-datepicker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Date Picker
A simple and reusable datepicker component for React (Demo)
Configuration
- Change date format by passing a different date format in the props:
dateFormat: "YYYY/MM/DD"
- Add placeholder text:
placeholderText: 'Click to select a date'
(Defaults to the selected date when no placeholder text is added) - Give users a predefined date range:
minDate: moment()
&maxDate: moment().add(5, 'days')
(this gives users the ability to select a date between today and 5 days in the future)
Installation
Installing is really simple and can be done in multiple ways:
- Install with Bower:
bower install react-date-picker
- Install with npm:
npm install react-datepicker --save
- Install with Bundler:
bundle install rails-assets-react-date-picker
Local Development
- Install Bower
npm install -g bower
- Install Bower Packages
bower install
- Install packages
npm install
- Run
grunt watch
in order to watch for local changes and run tests/build the code. - Start a static webserver
python -m SimpleHTTPServer
- And visit
localhost:8000/example
to see the example.
To run tests, simply run npm test
.
License
Copyright (c) 2014 HackerOne Inc. and individual contributors. Licensed under MIT license, see LICENSE for the full license.