Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki0410-dev committed Oct 21, 2022
1 parent 70c9e7f commit 4c89937
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ export default class Calendar extends React.Component {
componentDidUpdate(prevProps) {
if (
this.props.preSelection &&
!isSameDay(this.props.preSelection, prevProps.preSelection)
(!isSameDay(this.props.preSelection, prevProps.preSelection) ||
this.props.monthSelectedIn !== prevProps.monthSelectedIn)
) {
this.setState({
date: this.props.preSelection,
Expand Down

0 comments on commit 4c89937

Please sign in to comment.