Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
Fullcalendar resourceTimeGrid month view render

Hi guys i want to separate a month into 4-5 weeks so that each week will have 7 days.I cannot find a way to display the whole month in this view only the current week as you can see each week column contains the actual week days, but i would like to render the whole month with this scheme.

  this.calendarOptions = {
  headerToolbar: {
    left: '',
    center: 'title',
    right: 'prev next'
  },
  defaultAllDay:false,
  aspectRatio: 2.45,
  editable: false,
  slotMinWidth: 75,
  selectable: false,
  eventClassNames: ['mt-1'],
  eventResourceEditable: false,
  eventOverlap: false,
  initialView: 'resourceTimeGridSevenDay',
  resourceLabelClassNames: ['p-0'],
  resourceGroupLabelContent: (arg) => {
    return {html: `<strong>${arg.groupValue}</strong> `};
  },
  resourceLabelContent : (arg) => {
    return {html: `<span> ${arg.resource._resource.title}</span> `};
  },
  slotLabelContent: (arg) => {
    return {html: ` `};
  },

  eventClick: (arg) => {
    console.log('event click')
  },
  now: new Date().toISOString(), 
  resourceAreaHeaderContent: 'Sponsor/Protocol',
  resourceAreaWidth: '10%',
  views: {
    resourceTimeGridSevenDay: {
      type: 'resourceTimeGrid',
      duration: {days: 7},
      slotDuration: { weeks: 4 },
    }
  },
  events: 'https://fullcalendar.io/demo-events.json?with-resources=2',
  fixedWeekCount: false,
  rerenderDelay: 2,
  progressiveEventRendering: true,
  
  showNonCurrentDates: false,
  initialDate: new Date().toISOString(),
 
  }
}

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I'm not sure you can create exactly what you've shown in your screenshot using fullCalendar, but it's possible to get fairly close, and it might be good enough.

In the documentation for the slotLabelFormat setting, it mentions that for the timeline view it can be configured with multiple rows in the label area.

So you could still use the "month" view to get the correct number of days, but set up the slot labelling like this:

views: {
  resourceTimelineMonth: {
    slotLabelFormat: [
      { week: 'long', }, // top level of text
      { weekday: 'short', day: '2-digit' } // lower level of text
    ],
  }
},

It shows the week number as the week of the year rather than week of the month, and the date format is similar but not identical (and will vary a bit depending on your locale anyway).

Live demo: https://codepen.io/ADyson82/pen/BawNMEp

If you want even more control of the exact date format, you'd need to use one of the plugins as mentioned in the Date Formatting documentation.

Documentation:

  • slotLabelFormat
  • Date Formatting
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda