diff --git a/src/components/DatePicker.js b/src/components/DatePicker.js index 1d935c8..f4bbecd 100644 --- a/src/components/DatePicker.js +++ b/src/components/DatePicker.js @@ -151,7 +151,10 @@ export default class DatePicker extends Component { renderCalendar() { const { momentValue } = this.state; const { timePickerComponent: TimePicker, onChange, min, max, defaultMonth, calendarStyles, calendarContainerProps } = this.props; - + const updatedProps = {...calendarContainerProps, + onSelect: (selected) => {this.handleSelectDay.bind(this)(selected); calendarContainerProps.hasOwnProperty('onSelect') && calendarContainerProps.onSelect(selected)}, + onClickOutside: () => {this.handleClickOutsideCalendar(); calendarContainerProps.hasOwnProperty('onClickOutside') && calendarContainerProps.onClickOutside()} + } return (