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

Commit

Permalink
[fixed] Pass correct date to DaySlot for selections.
Browse files Browse the repository at this point in the history
fixes jquense#17, fixes jquense#18
  • Loading branch information
jquense committed Dec 13, 2015
1 parent 5ac5c30 commit a69600b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TimeGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ let TimeGrid = React.createClass({
},

renderEvents(range, events){
let { endAccessor, startAccessor, components } = this.props;
let { min, max, endAccessor, startAccessor, components } = this.props;
let today = new Date();

return range.map((date, idx) => {
Expand All @@ -140,6 +140,8 @@ let TimeGrid = React.createClass({
return (
<DaySlot
{...this.props }
min={dates.merge(date, min)}
max={dates.merge(date, max)}
eventComponent={components.event}
className={cn({ 'rbc-now': dates.eq(date, today, 'day') })}
style={segStyle(1, this._slots)}
Expand Down

0 comments on commit a69600b

Please sign in to comment.