Skip to content

Commit 35dd9e2

Browse files
author
yuki0410-dev
committed
fix #3779
1 parent 2400071 commit 35dd9e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/calendar.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ export default class Calendar extends React.Component {
228228
componentDidUpdate(prevProps) {
229229
if (
230230
this.props.preSelection &&
231-
!isSameDay(this.props.preSelection, prevProps.preSelection)
231+
(!isSameDay(this.props.preSelection, prevProps.preSelection) ||
232+
this.props.monthSelectedIn !== prevProps.monthSelectedIn)
232233
) {
233234
this.setState({
234235
date: this.props.preSelection,

0 commit comments

Comments
 (0)