lightning web component using
Lightning Web Component example that uses FullCalendar.js version 4.3.1 to display a custom calendar as a LWC within Salesforce.
note, to get fullcalendar to work within a LWC, I did have to make a modification to the core/main.js for fullcalendar to get click and touch events to work properly.
How to useIf you already haven't, download and install the Salesforce SFDX command line tool
There is only one lightning web component: fullCalendar
This component is intended to be added to a lightning app page, record page, or home page. However, it can also be embedded in another component as <c-full-calendar ...>
refer to the force-app/main/default/lwc/fullCalendar/fullCalendar.js-meta.xml file for properties that need to be included on the compoent to configure it. For example: will configure the component using the standard Salesforce Event object. These are also the defaults if you drag the component onto a page layout.
As of right now, click or touch events will navigate to the object that represents the event. The calendar works on a mobile device, but scrolling is a challenge on the Salesforce mobile app. I may get around to fixing that... and I may not.
Deploy to Scratch OrgLog into your production Dev Hub org:
sfdx force:auth:web:login -a devhub -d
Create a scratch org an push the component into it
sfdx force:org:create -f config/project-scratch-def.json -a MyScratchOrg sfdx force:source:push -u MyScratchOrg sfdx force:org:open -u MyScratchOrg
Navigate to the 'test' tab or add the fullCalendar component to a lightning page to test
Deploy to Sandboxsfdx force:auth:web:login -a MySandbox -r https://test.salesforce.com sfdx force:source:deploy -m LightningComponentBundle,ApexClass,StaticResource -u MySandbox
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。