1.0.0 • Published 8 years ago

@ieremeev/datepicker v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

@ieremeev/datepicker

@ieremeev/datepicker provides your with the input box and the calendar which helps to pick the date

Installation

Run this command:

npm install @ieremeev/datepicker --save

Usage

var DatePicker = require('@ieremeev/datepicker');

var MyComponent = React.createClass({
    getInitialState: function() {
        return {
            startDate: '',
        };
    },
    handleChange: function(date) {
        this.setState({
            startDate: date,
        });
    },
    render: function() {
        return (
            <DatePicker
                selected={this.state.startDate}
                onChange={this.handleChange}
            />
        );
    }
});

Props

@ieremeev/datepicker is just a wrapper for react-datepicker with Semantic UI style. You should look at the react-datepicker documentation for props