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

596
Views
¿Cómo agregar un botón a cada evento en fullcalendar v5? estoy usando la vista listWeek

Esto es lo que estoy tratando de lograr

(el botón fue editado a través del elemento de inspección por mí) He estado tratando de implementarlo usando eventRender sin suerte.

 <!DOCTYPE html> <html> <head> <script src="https://cdn.jsdelivr.net/npm/fullcalendar@5.11.0/main.min.js"></script> </script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fullcalendar@5.11.0/main.min.css"></script> </head> <body> <div id="calendar"></div> <script> let calendarEl = document.getElementById('calendar'); let calendar = new FullCalendar.Calendar(calendarEl, { initialView: 'listDay', views: { listDay: { type:'listWeek', dayCount:1 } }, events : [ {% for appointment in appointments %} { title : '{{ appointment[2] }}', start : '{{ appointment[1] }}', }, {% endfor %} ], eventRender: function(info) { info.el.innerHTML += "<button class='dayButton' data-date='" + info.start + "'>Click me</button>"; info.el.style.padding = "20px 0 0 10px"; } }); calendar.render(); </script> </body> </html>
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Al final lo resolví haciendo esto:

 eventContent: function (args, createElement) { const text = args.event._def.title + '<button onclick="alert(\'hello\')" style="float: right"> ciao </button>'; return { html: text }; },
about 4 years ago · Santiago Gelvez 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!