Forum Discussion
Custom visual arrange layers of visualization
Did you add jquery-datetimepicker.js into externalJS property of pbiviz.json?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
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
- v-viig8 years agoCommunity Champion
Power BI does not override events but it loads code into a new DIV.
I've seen such issues with similar components. Please review DOM when you click it. You would probably need to specify rootSelector for datepicker.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals