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

173
Views
How to get data from fetch in fullcalendar events?

i am trying to show my own data in calendar events via fetch. This is my code:

<script>
export default {
     data() {
       return {
         fechadatos: []
       }
     },
   async created() {
   // GET request using fetch with async/await
   const response = await fetch("http://127.0.0.1:8000/apifechaClase/");
   const data = await response.json();
   this.fechadatos = data[0]
     },
mounted() {
   document.addEventListener('DOMContentLoaded', function () {
   const calendarEl = document.getElementById('calendar');
   const calendar = new FullCalendar.Calendar(calendarEl, {
    headerToolbar: {
        left: 'prev,next today',
        center: 'title',
        right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
    },
    initialView: 'dayGridMonth',
    initialDate: '2020-09-12',
    navLinks: true, // can click day/week names to navigate views
    selectable: true,
    nowIndicator: true,
    dayMaxEvents: true, // allow "more" link when too many events
    editable: true,
    businessHours: true,
    events: [{
        title: 'All Day Event',
        start: '2020-09-01',
    }, {
        title: 'Long Event',
        start: '2020-09-07',
        end: '2020-09-10'
    }]
});
calendar.render();
});
 }
 }
 </script>

The problem is that i don't know how to put my info in to calendar events:

    events: [{
    title: var.from.api,
    start: var.from.api,
}, {
    title: var.from.api,
    start: var.from.api,
    end: var.from.api
}]

something like that (?) i don't know how to get the api info to show it.

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!