Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
[added] rbc-event-allday class in month view
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Oct 26, 2015
1 parent da5552e commit 4dac3f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/EventCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)}
>
Expand Down

0 comments on commit 4dac3f5

Please sign in to comment.