Skip to content

Commit cc84f17

Browse files
tobiasandersenjquense
authored andcommitted
fix: handleNavigate for undefined date (bigcalendar#889)
1 parent 558ee2d commit cc84f17

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Calendar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,12 +842,13 @@ class Calendar extends React.Component {
842842
handleNavigate = (action, newDate) => {
843843
let { view, date, getNow, onNavigate, ...props } = this.props
844844
let ViewComponent = this.getView()
845+
let today = getNow()
845846

846847
date = moveDate(ViewComponent, {
847848
...props,
848849
action,
849-
date: newDate || date,
850-
today: getNow(),
850+
date: newDate || date || today,
851+
today,
851852
})
852853

853854
onNavigate(date, view, action)

0 commit comments

Comments
 (0)