FullCalendar PHP Months

0

I'm using Personal FullCalendar with a query that has some appointments registered in a database, but I've got a problem that does not I know how to solve.

I can make the calendar pick up the bank's schedules only, the November schedules appear in the month of December.

fullCalendar has a css class named data-calendar-month , in this location it defines the number of the month (month 11,12 etc).

p>

Because it starts from 0 to count the months have some influence?

code:

$(document).ready(function() {
/*-----------------------------------------------------
Main Calendar
------------------------------------------------------*/
if($('#calendar')[0]) {
    var date = new Date ();
    var m = date.getMonth ();
    var y = date.getFullYear ();
    var target = $ ('#calendar');

    target.fullCalendar ({
        header: {
            right: '',
            center: 'm',
            left: ''
        },
        buttonIcons: {
            prev: 'calendar__prev',
            next: 'calendar__next'
        },


        theme: true,
        selectable: true,
        selectHelper: true,
        editable: true,
        eventLimit: 3,
        contentHeight: 900,

        events: [




        <?php  $i = 0; while($row = $calendario_todos->fetch(PDO::FETCH_ASSOC)) { ?>



            {


                id: <?php echo $row['id'];?>,


                title: '<?php echo $row['titulo'];?> ',


                start: new Date (<?php echo date('Y',strtotime($row['dtaInicio'])); ?>, <?php echo date('m',strtotime($row['dtaInicio'])); ?>, 


                    <?php echo date('d',strtotime($row['dtaInicio'])); ?>),


                allDay: true,


                color: '<?php  echo retornaCor(retornaDiaSemana(date('Y-m-d',strtotime($row["dtaInicio"])))); ?> ',



            },


            <?php  $i++;  } ?>



            ],
    
asked by anonymous 18.12.2017 / 20:21

0 answers