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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,904)