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

145
Vistas
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 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