From 4dac3f5ad79d92a90253d4650f62e422c93e8ce8 Mon Sep 17 00:00:00 2001 From: jquense Date: Mon, 26 Oct 2015 19:30:57 +0700 Subject: [PATCH] [added] rbc-event-allday class in month view --- src/EventCell.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/EventCell.jsx b/src/EventCell.jsx index f8bfa6b29..9658416fd 100644 --- a/src/EventCell.jsx +++ b/src/EventCell.jsx @@ -15,6 +15,9 @@ let EventCell = React.createClass({ let title = get(event, titleAccessor) , end = get(event, endAccessor) , start = get(event, startAccessor) + , isAllDay = get(event, props.allDayAccessor) + , continuesPrior = dates.lt(start, slotStart, 'day') + , continuesAfter = dates.gt(end, slotEnd, 'day') if (eventPropGetter) var { style, className: xClassName } = eventPropGetter(event, start, end, selected); @@ -25,8 +28,9 @@ let EventCell = React.createClass({ style={{...props.style, ...style}} className={cn('rbc-event', className, xClassName, { 'rbc-selected': selected, - 'rbc-event-continues-prior': dates.lt(start, slotStart, 'day'), - 'rbc-event-continues-after': dates.gt(end, slotEnd, 'day') + 'rbc-event-allday': isAllDay || dates.diff(start, dates.ceil(end, 'day'), 'day') > 1, + 'rbc-event-continues-prior': continuesPrior, + 'rbc-event-continues-after': continuesAfter })} onClick={()=> onSelect(event)} >