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

124
Views
color de encabezado diferente para cada recurso en fullcalendar v5.9

Estoy trabajando en fullcalendar v5.9 con recursos, quiero que cada recurso tenga un color de columna de fondo diferente o un color de encabezado de fondo diferente. ¿Cómo puedo hacer eso?

 var calendar = new FullCalendar.Calendar(calendarEl, { initialView: 'resourceTimeGridTwoDay', initialDate: dnew Date(), locale: 'it', selectable: true, dayMaxEvents: true, // allow "more" link when too many events eventTimeFormat: { // like '14:30:00' hour: '2-digit', minute: '2-digit', hour12: false, meridiem: false }, slotLabelFormat: { // like '14:30:00' hour: '2-digit', minute: '2-digit', hour12: false, meridiem: false }, headerToolbar: { left: 'prev,next today', center: 'title', right: 'resourceTimeGridDay,resourceTimeGridTwoDay,resourceTimeGridWeek' }, views: { resourceTimeGridTwoDay: { type: 'resourceTimeGrid', duration: { days: 3 }, buttonText: '3 days', slotDuration: '00:15', slotMinTime: '08:00', slotMaxTime: '21:15', } }, resources: [ { id: 'a', title: 'Room A' }, { id: 'b', title: 'Room B', eventColor: 'green' }, { id: 'c', title: 'Room C', eventColor: 'orange' }, { id: 'd', title: 'Room D', eventColor: 'red' } ], events: events2 }); calendar.render(); };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Lo resolví. Agrego esta sección al código de calendario completo

 resourceLabelDidMount: function (info) { if (info.resource.id == 2) info.el.style.backgroundColor = 'red'; },
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!