FULLCALENDAR - bring events

1

We have in the configuration of Fullcalendar the part of bringing the events in json form, I follow the following model:

$('#full-calendar').fullCalendar({
  events:{
          url: 'php_ajax/jq_agenda_calendario_dados.php',
          cache: true,      
          type: 'POST',
          data: {
                 param1: '',
                 param2: ''
                }
        }
});

Is there any way to pass parameters in url or data , because the way I'm doing I have to bring the whole database with events. I would like according to the person going forward or backward in the calendar, pass a parameter to bring only that period in which the person is visualizing the calendar.

    
asked by anonymous 19.10.2017 / 17:46

1 answer

1

Try this:

eventClick: function(event) {

                            $('#visualizar #id').text(event.id);
                            $('#visualizar #id').val(event.id);
                            $('#visualizar #title').text(event.title);
                            $('#visualizar #title').val(event.title);
                            $('#visualizar #start').text(event.start.format('DD/MM/YYYY HH:mm:ss'));
                            $('#visualizar #start').val(event.start.format('DD/MM/YYYY HH:mm:ss'));
                            $('#visualizar #end').text(event.end.format('DD/MM/YYYY HH:mm:ss'));
                            $('#visualizar #end').val(event.end.format('DD/MM/YYYY HH:mm:ss'));
                            $('#visualizar #color').val(event.color);
                            $('#visualizar').modal('show');
                            return false;

                        },

If you'd like to take a look at this fullcalendar: link

    
07.05.2018 / 16:39