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

141
Views
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
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!