1.0.0 • Published 10 years ago
@ieremeev/datepicker v1.0.0
@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 --saveUsage
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
1.0.0
10 years ago