Forum Discussion
tomseidel
8 years agoRegular Visitor
Custom visual arrange layers of visualization
Hi, we need a datetime picker as custom visual. One option seemed to be including bootstrap/jquery based external components. Thats what I tried, but cant get it to work. I used: "npm install jque...
v-viig
8 years agoCommunity Champion
Did you add jquery-datetimepicker.js into externalJS property of pbiviz.json?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- tomseidel8 years agoRegular Visitor
Yes:
"externalJS": [
"node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js",
"node_modules/jquery/dist/jquery.min.js",
"node_modules/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js",
"assets/js/jscripts.js"
],- v-viig8 years agoCommunity Champion
Please follow these steps:
- Create a new JS file
- Put this code into a new file: var $ = window.jQuery; var jQuery = window.jQuery
- Add this file into externalJS proeprty of pbiviz.json right after jquery
- pbiviz start
- Check if the issue is resolved
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- tomseidel8 years agoRegular Visitor
Hi Ignat,
that change it and its not throwing any error now. so the code is working.
But, the on-click events on that textbox are not firing any datetime visuals.
I guess the event handling has been overwritten by power bi? can I somehow reactivate that?
Thanks
Thomas