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

674
Views
FullCalender: ¿cómo obtener y mostrar automáticamente eventos anteriores?

Estoy tratando de mostrar eventos anteriores en fullCalendar. Pero hay un problema: después de definir un evento y luego actualizar la página, los eventos desaparecen.

¿Hay alguna forma de obtener todos los detalles de todos los eventos anteriores y mostrarlos en el calendario?

Este es mi código:

 document.addEventListener('DOMContentLoaded', function() { var calendarEl = document.getElementById('calendar'); let calendar = new FullCalendar.Calendar(calendarEl, { timeZone: 'UTC', initialView: 'dayGridMonth', selectable: true, headerToolbar: { left: 'prev,next', center: 'title' }, editable: true, eventClick: function(info) { info.jsEvent.preventDefault(); // don't let the browser navigate if (info.event.url) { window.open(info.event.url); } }, dateClick: function(info) { endDate = info.dateStr; localStorage.enddate = info.dateStr; setTimeout(cal, 1000); function cal() { if (imgUrl !== ' ' && today <= endDate) { calendar.addEvent({ title : `Post ${l++}`, url : `${imgUrl}`, start : `${today}`, end : `${endDate}` }); imgUrl = ' '; } else if (today > endDate) { alert('Please select a date that is in the future!'); } else { return; } } var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = yyyy + '-' + mm + '-' + dd; const date1 = new Date(`${today}`); const date2 = new Date(`${endDate}`); seconds = date2 - date1; console.log(seconds); } }); calendar.render(); });
about 4 years ago · Juan Pablo Isaza
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!