Skip to main content
se añadieron 110 caracteres en el cuerpo
Origen Enlace

I tried adding the JSIntento 1: Traté de agregar el src in the bootstrapJS en boostrap.js file. So, in bootstrap.js afteragregando después de:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

addlo siguiente:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

ThenLuego "npm run dev"

Then in the view write the call toLuego en la vista la llamada a fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

BUTPERO... even I could callfunciona la llamada a FullCalendar.Calendar it never found thepero nunca encuentra los plugins.

So, the only way I fund is to add all the code ein theIntento 2: Información de : https://fullcalendar.io/docs/initialize-es6

La única forma de que funcione es agregando todo el código en el archivo app.js, like thisasi:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

document.addEventListener('DOMContentLoaded', function() {
    if (document.getElementsByClassName('calendar').length) {
        var calendarEl = document.getElementsByClassName('calendar')[0];
        var calendar1 = new Calendar(calendarEl, {
            plugins: [ dayGridPlugin ]
        });
        calendar1.render();
    }
 });

And thenY luego correr npm run dev.

I tried adding the JS src in the bootstrap.js file. So, in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in the view write the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

BUT... even I could call FullCalendar.Calendar it never found the plugins.

So, the only way I fund is to add all the code ein the app.js, like this:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

document.addEventListener('DOMContentLoaded', function() {
    if (document.getElementsByClassName('calendar').length) {
        var calendarEl = document.getElementsByClassName('calendar')[0];
        var calendar1 = new Calendar(calendarEl, {
            plugins: [ dayGridPlugin ]
        });
        calendar1.render();
    }
 });

And then npm run dev.

Intento 1: Traté de agregar el src JS en boostrap.js, agregando después de:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

lo siguiente:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Luego "npm run dev"

Luego en la vista la llamada a fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

PERO... funciona la llamada a FullCalendar.Calendar pero nunca encuentra los plugins.

Intento 2: Información de : https://fullcalendar.io/docs/initialize-es6

La única forma de que funcione es agregando todo el código en el archivo app.js, asi:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

document.addEventListener('DOMContentLoaded', function() {
    if (document.getElementsByClassName('calendar').length) {
        var calendarEl = document.getElementsByClassName('calendar')[0];
        var calendar1 = new Calendar(calendarEl, {
            plugins: [ dayGridPlugin ]
        });
        calendar1.render();
    }
 });

Y luego correr npm run dev.

se añadieron 674 caracteres en el cuerpo
Origen Enlace

AddI tried adding the JS src in the bootstrap.js file. So, in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in the view write the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

BUT... even I could call FullCalendar.Calendar it never found the plugins.

So, the only way I fund is to add all the code ein the app.js, like this:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

document.addEventListener('DOMContentLoaded', function() {
    if (document.getElementsByClassName('calendar').length) {
        var calendarEl = document.getElementsByClassName('calendar')[0];
        var calendar1 = new Calendar(calendarEl, {
            plugins: [ dayGridPlugin ]
        });
        calendar1.render();
    }
 });

And then npm run dev.

Add the JS src in the bootstrap.js file. So, in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in the view write the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

I tried adding the JS src in the bootstrap.js file. So, in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in the view write the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

BUT... even I could call FullCalendar.Calendar it never found the plugins.

So, the only way I fund is to add all the code ein the app.js, like this:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

document.addEventListener('DOMContentLoaded', function() {
    if (document.getElementsByClassName('calendar').length) {
        var calendarEl = document.getElementsByClassName('calendar')[0];
        var calendar1 = new Calendar(calendarEl, {
            plugins: [ dayGridPlugin ]
        });
        calendar1.render();
    }
 });

And then npm run dev.

se añadieron 7 caracteres en el cuerpo
Origen Enlace

I addedAdd the JS src in the bootstrap.js file. So, like you did:

in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in mythe view I wrotewrite the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

I added the JS src in the bootstrap.js file, like you did:

bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then in my view I wrote the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....

Add the JS src in the bootstrap.js file. So, in bootstrap.js after:

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
} catch (e) {}

add:

window.FullCalendar = require('@fullcalendar/core');
window.dayGrid = require('@fullcalendar/daygrid');

Then "npm run dev"

Then in the view write the call to fullcalendar:

index.blade.php

if(jQuery('#calendar1').length){
    document.addEventListener('DOMContentLoaded', function() {

        var calendarEl = document.getElementById('calendar1');

        var calendar1 = new FullCalendar.Calendar(calendarEl, {
           plugins: [ 'timeGrid', 'dayGrid', 'list' ],
           timeZone: 'UTC',
           defaultView: 'dayGridMonth',
           header: {
              left: 'prev,next today',
              center: 'title',
              right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
           },
        .....
Origen Enlace
Loading