I created the function to create calendar and says it does not recognize as fullcalendar function

Asked

Viewed 28 times

1

$(function() {
    // page is now ready, initialize the calendar...
    $('#calendar').fullCalendar({
        eventColor: 'green',
        events:events,
        eventClick: function(calEvent, jsEvent, view) {
            alert( calEvent.title  );
        },
        monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
        monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Sep','Out','Nov','Dez'],
        dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sabado'],
        dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
        buttonText: { today: 'hoje', month: 'mês', week: 'semana', day: 'dia', list: 'lista' }
    });

});
  • Can you put the js in the question

1 answer

0

Check the JS import as below:

$(function() {
    // page is now ready, initialize the calendar...
    $('#calendar').fullCalendar({
        eventColor: 'green',
       // events:events, // a variavel events não foi definida neste contexto
        eventClick: function(calEvent, jsEvent, view) {
            alert( calEvent.title  );
        },
        monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
        monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Sep','Out','Nov','Dez'],
        dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sabado'],
        dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
        buttonText: { today: 'hoje', month: 'mês', week: 'semana', day: 'dia', list: 'lista' }
    });

});
<script src='http://fullcalendar.io/js/fullcalendar-2.1.1/lib/moment.min.js'></script>
<script src='http://fullcalendar.io/js/fullcalendar-2.1.1/lib/jquery.min.js'></script>
<script src="http://fullcalendar.io/js/fullcalendar-2.1.1/lib/jquery-ui.custom.min.js"></script>
<script src='http://fullcalendar.io/js/fullcalendar-2.1.1/fullcalendar.min.js'></script>

 
    
    
<div id='calendar'></div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.