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

523
Views
JS - FullCalendar: escucha cuando cambia el mes

Tengo un pequeño problema con FullCalendar v5, lo configuré con la vista dayGridMonth y me gustaría escuchar cuando el usuario cambia el mes actual ...

Por ejemplo, si está viendo febrero y hace clic en next , verá marzo, por lo que se esperaba un controlador como onChange o onMonthChange , pero no encontré nada en la documentación para hacer algo como esto...

Me di cuenta de cómo solucionar el problema haciendo mis propios botones anterior/siguiente y activando mi controlador personalizado con el clic... Pero me gustaría saber si hay una forma sencilla de hacerlo.

Gracias por tus respuestas.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Como lo mencionó @Devsi Odedra, la respuesta fue datesSet

El documento: https://fullcalendar.io/docs/datesSet

Este es mi código real si puede ayudar a alguien:

 new Calendar(document.getElementById("calendar"), { plugins: [ dayGridPlugin, interactionPlugin ], datesSet: event => { // As the calendar starts from prev month and end in next month I take the day between the range var midDate = new Date((event.start.getTime() + event.end.getTime()) / 2).getMonth() var month = `0${ midDate.getMonth() + 1 }`.splice(0, -1) doSomethingOnThisMonth(month, midDate.getFullYear()) } }); function doSomethingOnThisMonth(month, year) { fetch(`myApi.com/something?month=${ month }&year=${ year }`) .then((result) => { // Do something }) }
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!