dptoot / react-event-calendar

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

Events not rendering to calendar. #10

Closed JohnPett closed 8 years ago

JohnPett commented 8 years ago

I cannot get the events to render in to the event slots using the example on the homepage:

var events = [{
            start: '2015-07-20',
            end: '2015-07-21',
            title: 'test event',
            description: 'This is a test description of an event',
        },
        {
            start: '2015-07-18',
            end: '2015-07-19',
            title: 'test event',
            description: 'This is a test description of an event',
            data: 'you can add what ever random data you may want to use later',
        },
        ];

        return (

            <div className="Calendar">
                <EventCalendar 
                    ref={(ref) => this.calendar = ref}
                    month={7} 
                    year={2015} 
                    events={events}/>
            </div>

        );

When I log the output of the calendar it has the correct props, just not rendering the data visually to the DOM.

tc commented 8 years ago

Can you post the example on codepen or jsfiddle?

hyunchulkwak commented 8 years ago

I had a same issue and found that events array should be sorted by its start date.

dptoot commented 8 years ago

Are there still issues with rendering the events?