dptoot / react-event-calendar

A React calendar component to display events
131 stars 55 forks source link

Getting eventData = false in onEventClick? #24

Closed idolize closed 8 years ago

idolize commented 8 years ago

When I first load data and click on an event I occasionally get eventData with a value of false. When I click it a second time it has the correct data.

I'm sure it's not an issue with events, as they all render on the calendar correctly, and target.props.eventData looks correct (and I'm using that as a workaround for now). Any idea what could be causing this?

<EventCalendar
  month={currentTime.month()}
  year={currentTime.year()}
  events={events}
  onEventClick={(target, eventData) => {
    console.log(eventData); // => false
    console.log(target.props.eventData); // => the actual data
  }}
  onDayClick={this.handleDayClick}
  onEventMouseOver={this.handleEventMouseOver}
  onEventMouseOut={this.handleEventMouseOut} />
calvinclaus commented 8 years ago

Is this 0.3.0 only?

idolize commented 8 years ago

@calvinclaus I don't think so, no.