Skip to content

Commit

Permalink
fix: onRangeChange not passing localizer (jquense#1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
Georift authored and jquense committed Oct 21, 2018
1 parent eea7998 commit 80855e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,11 @@ class Calendar extends React.Component {
}

handleRangeChange = (date, view) => {
let { onRangeChange } = this.props
let { onRangeChange, localizer } = this.props

if (onRangeChange) {
if (view.range) {
onRangeChange(view.range(date, {}))
onRangeChange(view.range(date, { localizer }))
} else {
warning(true, 'onRangeChange prop not supported for this view')
}
Expand Down

0 comments on commit 80855e8

Please sign in to comment.