In google chrome everything works ok. When I open the application in mozilla React Date Picker returns invalid date
I tried to use the moment(this.state.startDate).toDate()
new Date(this.state.startDate)
but it doesn't work
class Example extends React.Component {
state = {
startDate: new Date()
};
handleChange = date => {
this.setState({
startDate: date
});
};
render() {
return (
<DatePicker
selected={this.state.startDate}
onChange={this.handleChange}
/>
);
}
}