Skip to content

Commit

Permalink
Merge branch 'master' into joshblack-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Jan 7, 2020
2 parents 363784e + 1c763f8 commit c2b8490
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react/src/components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ export default class DatePicker extends Component {
}
}

componentDidUpdate({ dateFormat: prevDateFormat }) {
const { dateFormat } = this.props;
if (this.cal && prevDateFormat !== dateFormat) {
this.cal.set({ dateFormat });
}
}

componentWillUnmount() {
if (this.cal) {
this.cal.destroy();
Expand Down

0 comments on commit c2b8490

Please sign in to comment.