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

140
Visualizações
Refresh specific resource and it's events in Full calendar

To refresh the specific resource and its events I am trying the following steps:

  1. Remove specific resource
  2. Create specific Resource again and add its newly fetched all events

Sample code

var resourceA = calendar.getResourceById('2');

resourceA.remove(); // Remove resource 2

var res =
{
    id: 2,
    title: 'Resource 2'
};

calendar.addResource(res); // To Add resource again

//Event creation

var evnt = [
    {
      resourceId : 2,
      start : "2021-09-22 00:30:00",
      end : "2021-09-22 01:30:00",
      title : "Event 1"
    },
    {
      resourceId : 2,
      start : "2021-09-22 02:30:00",
      end : "2021-09-22 03:30:00",
      title : "Event 2"
    }
];

calendar.addEventSource(evnt);  //Create events of resource 2

Now what happens is: when I create resource 2 again, previous events are not being removed. So then when I add events, duplicate events are showing.

Is there any way I can remove all events of resource 2 when I remove resource and fetch the events again? To be clear: not all the events of the calendar, just the ones from resource 2. Or if there is any better way please suggest.

Thanks.

about 4 years ago · Juan Pablo Isaza
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