react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Doesn't work

Open wzup opened this issue 9 years ago • 3 comments

Calendar doesn't appear on click. Styles are not applied. No errors throw though

search form - google chrome 2017-04-11 00 27 48

const DatePicker = require('react-datepicker');
const moment = require('moment');
require('react-datepicker/dist/react-datepicker.css');


class DP extends React.Component {
    render() {

        return (
            <div className={this.props.className}>
                <DatePicker
                    selected={this.state.startDate}
                    onChange={this.handleChange}
                    selectsStart
                    startDate={this.state.startDate}
                    endDate={this.state.endDate}
                />

            </div>
        );
    }

    handleChange (date) {
        this.setState({
            startDate: date,
        });
    }

    constructor(props) {
        super(props);
        this.state = {
            startDate: moment(),
            endDate: moment()
        };
    }

wzup avatar Apr 10 '17 16:04 wzup

I have the same problem. Although I see datepicker rendered in html but its' transform properties are calculated all wrong so datepicker is outside of the page. Maybe something's wrong with tether.js?

SimonaJ avatar Apr 12 '17 13:04 SimonaJ

Styles works)) And I'm not sure about it this.state = { startDate: moment(), endDate: moment() };

alex-shamshurin avatar Apr 24 '17 08:04 alex-shamshurin

Closing due inactivity.

martijnrusschen avatar Jul 10 '17 08:07 martijnrusschen