cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eromerof
Regular Visitor

Integrate Npm package with PCF

Hi experts!

 

Can you help me? I need to integrate bootstrap year calendar (https://www.bootstrap-year-calendar.com/) in a Custom Control for Dynamics 365. I have tried to install this component by npm as indicated in documentation: https://www.bootstrap-year-calendar.com/#Documentation/Installation

 

In theory, when I build a Div element with a property data-provide="calendar" the calendar the calendar is built. I have tried this in local and this solution works but in the PCF not working. It's neccesary to add dependencies by import statement like this? -> 

import * as $ from "jquery";
 
In case I need to add dependencies, what should I add or where can I look at it?
 
Thank you!
2 REPLIES 2
rexkenley
Kudo Collector
Kudo Collector

@eromerof 

 

Have a look at my repository https://github.com/rexkenley/pcf-react. It is for react but the general concept is the same for bootstrap. You have set your imports in index.ts and manage the calendar in init and updateView events.

 

Cheers!

 

ben-thompson
Solution Sage
Solution Sage

All external JS libraries need to be referenced / imported within the index.ts file as otherwise they will be ignored.

 

Interestingly in my research it seems that that control has been deprecated and the same author has a new version at https://year-calendar.github.io/  and clear cut documentation.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,922)