Skip to content

Commit

Permalink
fix #3779
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki0410-dev committed Oct 21, 2022
1 parent 2400071 commit 35dd9e2
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 35dd9e2

Please sign in to comment.