FullCalendar Plugin in Salesforce Lightning Component
Author
May 7, 2019
Fullcalendar plugin is quite a useful tool for many calendar-related applications. It has been widely used with various javascript applications and even visualforce pages.
However, this plugin is also compatible with lightning as it is entirely created using jQuery.
The first step in using this plugin with your lightning component is to download it and upload it as a zip folder to your dev org as a static resource.
The second step is to include it in your lightning component –
<ltng:require styles=”{!$Resource. StaticResourceName + ‘/fullcalendar-3.8.0/fullcalendar.css’}” scripts=”{!join(‘,’,
$Resource.StaticResourceName + ‘/fullcalendar-3.8.0/lib/jquery.min.js’,
$ Resource.StaticResourceName + ‘/fullcalendar-3.8.0/lib/moment.min.js’, $Resource.StaticResourceName + ‘/fullcalendar-3.8.0/fullcalendar.js’)}” afterScriptsLoaded=”{!c.doInit}” />
Please make sure that all the components are added, and the file paths are correct.
Once you use the above statement in your component, the doInit method becomes your entry point. It can of course be renamed to anything you like.
In the third step let us define the controller method
Once the header is defined, the calendar takes form in your component although it would not do anything yet.
The Header
You can customize the look as you wish. If the header has no basicWeek or agendaWeek mentioned under the right key the button to switch to week view will not appear (like in the above screenshot).
Example header and screen:
header: {
left: ”,
center: ‘title’,
right: ”
}
The dayRender method gets called every time a view is loaded, for example when you switch from month view to day view or vice versa.
The eventClickfunction is not mandatory, and you can redirect to any page by clicking on an event by adding an URL you want to the url attribute of the event.
The dayClick function executes when you click anywhere within the day view component on your screen. It is also not a mandatory function.
If you need to execute any apex controller method to show data or events in your calendar, then enclose this method – (‘#calendar’).fullCalendar({ }); in your callback as server-side calls in lightning are asynchronous.
Adding and Removing events
Adding – $(‘#calendar’).fullCalendar( ‘addEventSource’, ev );
Removing – $(‘#calendar’).fullCalendar( ‘removeEventSource’, ev );
Where is an array containing events.
The events array can be populated inside the “dayRender†method as this method is called at the time of loading of each view.
Pranshu Goyal, Director of Products at Mirekta, states: “We envision DSM to be used by every small to a medium-sized organization dealing with bad data and want to get rid of duplicates easily with no cost. We have faced issues dealing with duplicates in our organization. That inspired us to make a solution that is not only simple to use but can be used widely to make the organization’s data clean to make them more efficient and productive. We want DSM to be a solution for every organization looking for duplicate management capability better than the Salesforce out-of-the-box solution with no additional cost.”
Recent Posts
-
The Hybrid Advantage in Salesforce QA20 May 2026 Blog -
CI/CD in Salesforce: Role of QA in DevOps Pipeline19 May 2026 Blog -
Reasons Why Addiction Treatment Centers should consider leveraging Salesforce as a CRM18 May 2026 Blog -
Insights on employee engagement15 May 2026 Blog -
AI Governance Why Businesses Need an AI Strategy Before Implementing AI14 May 2026 Blog -
Salesforce Agentforce: Revolutionizing AI with Autonomous Agents13 May 2026 Blog -
Salesforce Headless 360 Guide | Mirketa13 May 2026 Blog -
Salesforce Custom Permissions12 May 2026 Blog -
Salesforce Education Cloud – Time is Now11 May 2026 Blog -
Top Salesforce Performance Optimization Techniques for Large Enterprises08 May 2026 Blog -
AI Orchestration for Enterprises: Scale Smarter, Faster, and Securely08 May 2026 E-Book -
Stress is always on a vacation @ Mirketa08 May 2026 Blog -
UiPath RPA with AI Capabilities in Salesforce07 May 2026 Blog -
The ROI of AI in Enterprise Applications06 May 2026 Blog -
Rethinking Enterprise Quoting in Salesforce28 Apr 2026 Blog -
Integration Testing with Data Warehouse27 Apr 2026 Blog -
Salesforce Nonprofit Cloud vs NPSP: 2026 Comparison Guide24 Apr 2026 Blog -
Top Use Cases of Salesforce Experience Cloud for Businesses23 Apr 2026 Blog -
How Salesforce Nonprofit Cloud is Transforming Fundraising, Grant Management & CRM in 202622 Apr 2026 Blog -
Get Proactive with Salesforce-Mirketa’s Vaccine Cloud Solutions19 Apr 2026 Blog