Commit a017294f authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf
Browse files

Destroy pickadate on component unmount

parent 71911a44
Pipeline #9510 passed with stage
in 2 minutes and 15 seconds
......@@ -29,6 +29,11 @@ export default class DatePicker extends React.Component {
});
}
componentWillUnmount() {
if (this.pickadate)
this.pickadate.stop();
}
setMaxOrMin(pickerOptions, props) {
// Maybe a minimum or maximum value is set
pickerOptions.max = props.maxDate ? new Date(props.maxDate) : false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment