Render JSON events on full calendar
<p>I'm trying to render events on the fullcalendar from the json response,</p>

<pre><code>$.ajax({
        url : $("body").attr("data-link")+'/calendar/events',
        type : 'post',
        dataType: 'json',
        success: function(e){
            if(e.success){
                var events = [];
                $.each(e.events,function(index,value){
                    events.push({
                        title : value.title,
                        start : moment(value.start_date).format('YYYY-MM-DD'),
                        end : moment(value.end_date).format('YYYY-MM-DD'),
                    });
                });
                calendar.fullCalendar( 'renderEvent', events , true);
                console.log(events);
            }
        }
    });
</code></pre>

<p>here's my fullcalendar set up</p>

<pre><code>var calendar = $('#calendar').fullCalendar({
        customButtons: {
            myCustomButton: {
                text: 'Add Event',
                click: function() {

                }
            }
        },
         header: {
            left: 'prev,next today myCustomButton',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        editable : false,
        eventLimit: true,
        eventClick: function(calEvent, jsEvent, view, element) {
        },
        eventRender: function(event, element) {
            element.attr("data-id",event.id);
        },

    });
</code></pre>

<p>In the console log.</p>

<p><a href="https://i.stack.imgur.com/kgZjV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kgZjV.jpg" alt="enter image description here"></a></p>

<p>and then it gives me this error,</p>

<blockquote>
  <p>Uncaught TypeError: Cannot read property 'hasTime' of undefined</p>
</blockquote>

<p>any ideas, help please?</p>