From f66365c761019ab6e8eecaa311b103985d6bd3fa Mon Sep 17 00:00:00 2001 From: Tim Cochrane Date: Sun, 21 Oct 2018 15:08:18 +0800 Subject: [PATCH] Fix onRangeChange not passing localizer --- src/Calendar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Calendar.js b/src/Calendar.js index 3d34ff394..646d9ba7f 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -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') }