Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

342
Views
Cómo cargar nuevos eventos en FullCalendar

Estoy usando FullCalendar 3.2. El problema es si obtengo los eventos actuales del calendario y los borro y luego agrego nuevos a la matriz. cuando llamo

 $('#calendar').fullCalendar( 'updateEvents',eventsList);

No funciona pero tira error

 Uncaught TypeError: Cannot read property 'clone' of undefined at Y (fullcalendar.min.js:6) at Bt.x [as updateEvents] (fullcalendar.min.js:6) at HTMLDivElement.<anonymous> (fullcalendar.min.js:6)

Este es el código dentro del controlador de clic de botón

 var items = $('#calendar').fullCalendar( 'clientEvents'); items.splice(0, items.length); items.push({ title: 'All Day Event', start: '2017-02-01' }); items.push({ title: 'Long Event', start: '2017-02-07', end: '2017-02-10' }); $('#calendar').fullCalendar( 'updateEvents',items);

Intenté usar jquery versión 2.2.4 y 3.1.1 pero no tuve suerte.

 <link rel="stylesheet" href="resources/css/default.css"> <link rel='stylesheet' href='resources/css/fullcalendar.css' /> <script src='resources/js/jquery-3.1.1.min.js'></script> <script src='resources/js/moment-with-locales.min.js'></script> <script src='resources/js/fullcalendar.js'></script>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puedes probar esto: https://fullcalendar.io/docs1/event_rendering/renderEvent/

 $("#calendar").fullCalendar( /* option */); var items = [ { title: 'All Day Event', start: '2017-02-01' }, { title: 'Long Event', start: '2017-02-07', end: '2017-02-10' } ]; for ( var i = 0; i < items.length; i++ ) { $('#calendar').fullCalendar( 'renderEvent', items[i]); }

renderEvent : Representa un nuevo evento en el calendario.

Nota : el evento debe ser un objeto de evento con un título y comenzar como mínimo.

demostración aquí

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!