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

113
Views
FullCalendar v5 no representa el evento del retorno de PHP JSON

Estoy usando FullCalendar v5 (ya que estoy desarrollando el sitio web usando una plantilla usando v5). El siguiente es el código en mi archivo frontend para iniciar el calendario:

 var date = new Date() var d = date.getDate(), m = date.getMonth(), y = date.getFullYear() var Calendar = FullCalendar.Calendar; var calendarEl = document.getElementById('calendar'); // initialize the external events // ----------------------------------------------------------------- var calendar = new Calendar(calendarEl, { headerToolbar: { left: 'prev,next,today', center: 'title', right: '' }, themeSystem: 'bootstrap', events: { url: '/load/load_event.php, method: 'GET', failure: function () { alert('there was an error while fetching events!'); } } }); calendar.render();

Y el retorno JSON para load_event.php es el siguiente:

 [ { "id": 1, "Title": "Not Available", "Start": "2022-07-21", "End": "2022-08-05", "backgroundColor": "#FF0000", "borderColor": "#FF0000" } ]

Puedo renderizar el calendario sin problema, pero el evento no se muestra en mi calendario, ¿hay algo que me perdí?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

su JSON está bien, pero los nombres de los campos son incorrectos, específicamente las mayúsculas y minúsculas de Título, Inicio y Fin, que deben ser title , start y end

 [{"id":1,"title":"Not Available","start":"2022-07-21","end":"2022-08-05","backgroundColor":"#FF0000","borderColor":"#FF0000"}]

una vez corregido funciona muy bien ejemplo de trabajo

about 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!