Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
Custom horizon (5 months) with FullCalendar Timeline

I'm working on a project where I have to create some particular views on FullCalendar 5 in timeline with React.

The idea is to display more or less long periods with duration slots per month.

Generally, the horizons will be by 6 months, but I can't find how to make custom views with a precise horizon (Ex: 01 April - 31 August).

I thought it was possible by defining a start + a duration, but obviously no way to do it dynamically, because the user must be able to change the horizon when needed.

Did I miss an option to do this? Or is FullCalendar really not made for this?

Thank you!

almost 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Make a custom view with 5 month duration, add the button to the header:

  • https://fullcalendar.io/docs/custom-views
  • https://fullcalendar.io/docs/duration
let calendar = new Calendar(calendarEl, {
  customButtons: {
    resourceTimelineSixMonths: {
      text: 'resourceTimelineSixMonths',
      click: () => {calendar.changeView('resourceTimelineSixMonths')},
    },
  },
  headerToolbar: {
    left:   'title',
    right:  'prev,today,next resourceTimelineSixMonths',
  },
  initialView: 'resourceTimelineSixMonths',
  views: {
    resourceTimelineFiveMonths: {
      duration: { months: 5 },
      type: 'resourceTimelineMonth',
    },
  },
};

You can tell the calendar what date to start on: https://fullcalendar.io/docs/initialDate

let calendar = new Calendar(calendarEl, {
  initialDate: '2022-09-28',
};

You can also play with adding this to the calendar object: https://fullcalendar.io/docs/visibleRange

let calendar = new Calendar(calendarEl, {
  visibleRange: {
    start: '2022-09-23',
    end: '2023-02-23',
  },
};
almost 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda