Skip to content

Commit

Permalink
fix(DatePicker): fix for new onChange ref after mount (#3050)
Browse files Browse the repository at this point in the history
Fixes #3042.
  • Loading branch information
asudoh committed Jun 13, 2019
1 parent 0711cab commit c8caed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/DatePicker/DatePicker.js
Expand Up @@ -316,7 +316,6 @@ export default class DatePicker extends Component {
datePickerType,
dateFormat,
locale,
onChange,
minDate,
maxDate,
value,
Expand Down Expand Up @@ -354,6 +353,7 @@ export default class DatePicker extends Component {
nextArrow: this.rightArrowHTML(),
prevArrow: this.leftArrowHTML(),
onChange: (...args) => {
const { onChange } = this.props;
if (onChange) {
onChange(...args);
}
Expand Down

0 comments on commit c8caed5

Please sign in to comment.