import React from 'react'; import SingleDatePicker from 'react-dates/lib/components/SingleDatePicker'; class SingleDatePickerWrapper extends React.Component { constructor(props) { super(props); this.state = { focused: false, date: null, }; this.onDateChange = this.onDateChange.bind(this); this.onFocusChange = this.onFocusChange.bind(this); } onDateChange(date) { this.setState({ date }); } onFocusChange({ focused }) { this.setState({ focused }); } render() { const { focused, date } = this.state; return ( ); } } export default SingleDatePickerWrapper;