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

254
Views
'No se pueden leer las propiedades de los eventos indefinidos' Vue.JS
 <FullCalendar id="calendar" :options="calendarOptions" /> </section>

 export default { components: { FullCalendar }, data() { return { calendarOptions: { plugins: [dayGridPlugin ,interactionPlugin, timeGridPlugin, listPlugin],

 methods:{ newEvent(){ var theCalendar = document.getElementById("calendar"); var eventName = document.getElementById("Ename").value; var sDate = document.getElementById("startDate").value; var eDate = document.getElementById("endDate").value; var type = document.getElementById("bookingType").value; var number = document.getElementById("numberOfPeople").value; //The addEvent can't be accessed, currently this function doesn't have access to the object Fullcalendar and because of that //we can't use addEvent. theCalendar.addEvent({ title: eventName, start: sDate, allDay: true }); alert('Great. Now, update your database...'); } }

Hola, mi código vue.JS en este momento no puede leer propiedades indefinidas. Quiero poder completar la clase addEvent con mis propiedades de calendario.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

si está intentando acceder a la API

debe proporcionar una referencia en su calendario

 <FullCalendar ref="fullCalendar" :options="calendarOptions" />

que luego se puede acceder como tal

 let calendarApi = this.$refs.fullCalendar.getApi() calendarApi.next()

ver aquí

sin embargo, sospecho que lo que realmente quiere es acceder al objeto calendarOptions, que es tan simple como

 this.calendarOptions.events

suponiendo que haya definido el objeto como se especifica en el enlace anterior

 data() { return { calendarOptions: { plugins: [ dayGridPlugin, interactionPlugin ], events: [ { title: 'event 1', date: '2019-04-01' }, { title: 'event 2', date: '2019-04-02' } ] } } },
about 4 years ago · Juan Pablo Isaza 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!