FullCalendar does not correctly display the 'end' date

1

I have my list of events, which have a start and end date (format YYYY-MM-DD). These events are displayed in the FullCalendar calendar:

However the dates are not shown in full, but the end date of each event does not take the last day, for example, the event "BIRTHDAY" (green) has a duration from Wednesday 1 until Saturday 4 , however on Saturday 4 it does not include it. What I'm looking for is to include these dates of events, something like this:

This is the javascript that shows the event in the calendar:

    $(document).ready(function()
     {
        // page is now ready, initialize the calendar...
        $('#calendar').fullCalendar(
        {
            locale: 'es',
            header:
            {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            editable: false,
            events: [
            @foreach($eventos as $evento)
            {
                title: "{!! $evento->Nombre !!}",
                start: "{!! $evento->FechaDesde !!}",
                end: "{!! $evento->FechaHasta !!}",
                url: "{!! url("abm_acciones/mostrarevento/".$evento->CD_Evento) !!}",
                allDay: true
            },
            @endforeach
            ]
        });
    });

Thank you!

    
asked by Liski 09.03.2017 в 19:55
source

2 answers

3

The plugin is interpreting well the duration of the dates starts on Wednesday 1 at 0 hrs and ends on Saturday 4 at 0 hrs.

Now if you pass a date in this way 2017/01/01 the plugin will add the hours leaving the date in this way 2017/01/01 00:00:00 , if what you want is that it also occupies the final day of the date end the date in this format 2017/01/04 23:59:59 will occupy all day.

    
answered by 09.03.2017 в 20:17
0

friends, as you would do to be able to always activate the Current Date in the FullCalendar since it appears is a predefined date

$(document).ready(function() {

    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,basicWeek,basicDay'
        },
        defaultDate: '2017-10-09',
        editable: true,
        eventLimit: true, // allow "more" link when too many events
        selectable: true,
        selectHelper: true,
        select: function(start, end) {

            $('#ModalAdd #start').val(moment(start).format('YYYY-MM-DD HH:mm:ss'));
            $('#ModalAdd #end').val(moment(end).format('YYYY-MM-DD HH:mm:ss'));
            $('#ModalAdd').modal('show');
        },

I would like the PC to appear

and another doubt is, the values of the Days and Months appear in English, where I can edit them to put them in Spanish, including those of the buttons (Today, Week, Month and Day) of the menu or options of the Fullcalendar menu

    
answered by 08.10.2017 в 22:57