react-datepicker
react-datepicker copied to clipboard
Doesn't work
Calendar doesn't appear on click. Styles are not applied. No errors throw though

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()
};
}
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?
Styles works)) And I'm not sure about it
this.state = {
startDate: moment(),
endDate: moment()
};
Closing due inactivity.