diff --git a/src/Calendar.js b/src/Calendar.js index bce089cd0..af8cc92c6 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -8,10 +8,8 @@ import { , dateRangeFormat , views as componentViews } from './utils/propTypes'; -import localizer from './localizer' import { notify } from './utils/helpers'; import { navigate, views } from './utils/constants'; -import dates from './utils/dates'; import defaultFormats from './formats'; import viewLabel from './utils/viewLabel'; import moveDate from './utils/move'; diff --git a/src/TimeGrid.js b/src/TimeGrid.js index fa8507fe9..e9fe84d9d 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -121,6 +121,15 @@ export default class TimeGrid extends Component { } } + handleSelectAllDaySlot = (slots) => { + const { onSelectSlot } = this.props; + notify(onSelectSlot, { + slots, + start: slots[0], + end: slots[slots.length - 1] + }) + } + render() { let { events @@ -213,22 +222,13 @@ export default class TimeGrid extends Component { } renderHeader(range, events, width) { - let { messages, rtl, onSelectSlot, selectable, components } = this.props; + let { messages, rtl, selectable, components } = this.props; let { isOverflowing } = this.state || {}; let style = {}; if (isOverflowing) style[rtl ? 'marginLeft' : 'marginRight'] = scrollbarSize() + 'px'; - function handleSelectSlot({ start, end }) { - let slots = range.slice(start, end + 1) - notify(onSelectSlot, { - slots, - start: slots[0], - end: slots[slots.length - 1] - }) - } - return (
+ culture={culture} + />
)