Add url json event in fullcalendar

0

I'm using fullcalendar, nodejs, and mongoose. I have already been able to generate the json file. But by passing the path in fullscalendar js, I can not retrieve events.

I created a test file in json and called it as follows:

 script(type='text/javascript'). 
    $(document).ready(function() {
      $('.calendar').fullCalendar( {
          header: {
            right: 'prev,next today,month,agendaWeek,agendaDay'
          },
          aspectRatio: 2,
          events: "/calendars.json"
      } );
    });

But it does not work. I wanted to know how I can do to call the mongoose information and display it on the calendar.

    
asked by anonymous 12.06.2015 / 16:06

1 answer

1

resolved: obs: it is necessary to download the js qtip to add pop-up with the events.

script(type='text/javascript').$(document).ready(function() {
      $('.calendar').fullCalendar({
        header: {
          right: 'prev,next today,month,agendaWeek,agendaDay'
        },
        events: "/calendars/calendarjson",//caminho arq. json
        eventRender: function(event, element)//abrir popup cm eventos {
          element.qtip({
            content: "" + event.flRoot+""+"<br/>" + "Cliente: " + event.client+""+"<br/>" + "Pauta: " + event.name+"", 
          });
        } 
      });
    });
    
16.06.2015 / 19:20