<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Visual - To implement Date Range Picker in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/1121072#M23883</link>
    <description>&lt;P&gt;There are several 3rd party solutions to add Date Pickers and Date Range Pickers that can be added to Power BI as custom Viz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We had many users pushing us (BI Analyts) to come up with a more professional solution that works well and looks good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I had to write my own custom Visual DatePicker (and go through the steep learning curve to learn all: Node Js, Ms Code, JavaScript, XML Parameters, Syncfusion parameters, Power BI compilation process, Sync calendars, etc) it took me around 2 months or more to come up with something end users would love and accept to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I didn't want to reinvent the wheel, I searched and searched all over to find some source code I could re-use inside Power BI environment. Because Power BI acts and works like a website,&amp;nbsp; I thought I should look for javascript components.&amp;nbsp; So I found and purchased the SyncFusion Essential JS 2 libraries, just to use one control, the datePicker, the other 59 controls are available for us to use at another time if we want...&lt;/P&gt;&lt;P&gt;A sample of how their calendar datepicker works in on their demo page... &lt;A title="SyncFusion DatePicker Demo" href="https://ej2.syncfusion.com/javascript/demos/#/material/datepicker/default.html" target="_self"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Disclaimer : I don't work for SyncFusion or get paid by them to say these comments, I'm just a frustrated user that wanted a professional solution inside Power BI, which according to most users, should be out by now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clicking on a Day will select that date, clicking on "May 2020" will allow you to select the Month, and further down, clicking on the "2020" will allow you to select the Year. Very simple, elegant and professional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;picking a day ;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 291px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282771iF2969F86FB3BCA3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;picking a Month&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 280px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282770iC4F538EE7EADB0E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;picking a Year :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pick a year" style="width: 288px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282769i71F949582BBAC837/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="pick a year" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;pick a year&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what mine looks inside Power BI...&lt;/P&gt;&lt;P&gt;Users click on the Calendar Icon, and I bring the bookmark Page that contains the&amp;nbsp;&lt;/P&gt;&lt;P&gt;DatePicker Control.&amp;nbsp; Allowing them to select ONE, single date.&lt;/P&gt;&lt;P&gt;(I removed some labels from the grid, to protect the inocent :)...)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 691px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282775iADD66B27A62E0D85/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 212px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282784i61214DD8BF0CB359/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this helps some people...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andres&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 22:18:32 GMT</pubDate>
    <dc:creator>andres777</dc:creator>
    <dc:date>2020-05-26T22:18:32Z</dc:date>
    <item>
      <title>Custom Visual - To implement Date Range Picker</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/685370#M19326</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making a custom visual with dropdown values like Today, Yesterday and Custom Dates. If I click custom dates, it should open a date range picker. I also followed other thread mentioned here.&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Date-Range-Custom-visual/td-p/296757" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Developer/Date-Range-Custom-visual/td-p/296757&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am using jquery and date range picker from&amp;nbsp;&lt;A href="http://www.daterangepicker.com/" target="_blank" rel="noopener"&gt;http://daterangepicker.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To Note:-&amp;nbsp;&lt;/STRONG&gt;Current pbiviz version installed - 3.0.12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My package.json libraries entry look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt; "@types/daterangepicker": "^2.1.17",
    "@types/jquery": "^2.0.41",
    "bootstrap": "^4.3.1",
    "d3": "^5.9.2",
    "daterangepicker": "^3.0.5",
    "jquery": "^3.2.1",&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Even jQuery is working fine in my visual.ts file. For example, this code works like magic:&lt;/P&gt;&lt;PRE&gt;import * as $ from "jquery";

private $root: JQuery;
private $searchHeader: JQuery;

update() {
this.$root = $("#sandbox-host").addClass("custom-jquery");
      this.$root.append('&amp;lt;form id="mySearch"&amp;gt;&amp;lt;/form&amp;gt;');
      this.$searchHeader = $('#mySearch').append('&amp;lt;input name="datefilter" type="text" 
      value="01/01/2018 - 01/15/2018" class="form-control" /&amp;gt;');
}&lt;/PRE&gt;&lt;P&gt;But, at this line, it gives me the error.&lt;/P&gt;&lt;PRE&gt;$('input[name="datefilter"]').daterangepicker({
        opens: 'left'
      }, function(start, end, label) {
        console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
      });&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Error in console is&amp;nbsp;&lt;/STRONG&gt;-&amp;nbsp;jquery__WEBPACK_IMPORTED_MODULE_124__(...).daterangepicker is not a function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&amp;nbsp;I have seen you tried similarly to fix other issues. I would be glad if I get some help here.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 10:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/685370#M19326</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T10:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - To implement Date Range Picker</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/685479#M19328</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&amp;nbsp;Just an update.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-visuals/issues/543#issuecomment-490059785&amp;nbsp;" target="_blank"&gt;https://github.com/microsoft/PowerBI-visuals/issues/543#issuecomment-490059785&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Based on the above line comment, it has to be used with window.jQuery or similar approach. I believe you have added jQueryInjector.js in the previous code.&lt;/P&gt;&lt;P&gt;Any idea how I can add that or similar workaround for pbiviz 3+ versions code.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 12:45:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/685479#M19328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - To implement Date Range Picker</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/688504#M19360</link>
      <description>&lt;P&gt;It's ok. The issue is now fixed. Seems like PBIVIZ doesn't support third-party jQuery libraries and its functionality with custom visual code.&lt;/P&gt;&lt;P&gt;A better approach is by using the Webpack configuration&amp;nbsp;&lt;A href="https://github.com/Microsoft/powerbi-visuals-webpack-plugin#webpack-configuration" target="_self"&gt;Webpack Configuration for Custom Visual&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more information follow this Github thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/PowerBI-visuals/issues/543" target="_self"&gt;Power BI Custom Visual - Date Range Picker&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 09:17:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/688504#M19360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-10T09:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - To implement Date Range Picker</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/1121072#M23883</link>
      <description>&lt;P&gt;There are several 3rd party solutions to add Date Pickers and Date Range Pickers that can be added to Power BI as custom Viz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We had many users pushing us (BI Analyts) to come up with a more professional solution that works well and looks good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I had to write my own custom Visual DatePicker (and go through the steep learning curve to learn all: Node Js, Ms Code, JavaScript, XML Parameters, Syncfusion parameters, Power BI compilation process, Sync calendars, etc) it took me around 2 months or more to come up with something end users would love and accept to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I didn't want to reinvent the wheel, I searched and searched all over to find some source code I could re-use inside Power BI environment. Because Power BI acts and works like a website,&amp;nbsp; I thought I should look for javascript components.&amp;nbsp; So I found and purchased the SyncFusion Essential JS 2 libraries, just to use one control, the datePicker, the other 59 controls are available for us to use at another time if we want...&lt;/P&gt;&lt;P&gt;A sample of how their calendar datepicker works in on their demo page... &lt;A title="SyncFusion DatePicker Demo" href="https://ej2.syncfusion.com/javascript/demos/#/material/datepicker/default.html" target="_self"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Disclaimer : I don't work for SyncFusion or get paid by them to say these comments, I'm just a frustrated user that wanted a professional solution inside Power BI, which according to most users, should be out by now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clicking on a Day will select that date, clicking on "May 2020" will allow you to select the Month, and further down, clicking on the "2020" will allow you to select the Year. Very simple, elegant and professional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;picking a day ;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 291px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282771iF2969F86FB3BCA3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;picking a Month&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 280px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282770iC4F538EE7EADB0E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;picking a Year :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pick a year" style="width: 288px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282769i71F949582BBAC837/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="pick a year" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;pick a year&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what mine looks inside Power BI...&lt;/P&gt;&lt;P&gt;Users click on the Calendar Icon, and I bring the bookmark Page that contains the&amp;nbsp;&lt;/P&gt;&lt;P&gt;DatePicker Control.&amp;nbsp; Allowing them to select ONE, single date.&lt;/P&gt;&lt;P&gt;(I removed some labels from the grid, to protect the inocent :)...)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 691px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282775iADD66B27A62E0D85/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 212px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/282784i61214DD8BF0CB359/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this helps some people...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andres&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 22:18:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/1121072#M23883</guid>
      <dc:creator>andres777</dc:creator>
      <dc:date>2020-05-26T22:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - To implement Date Range Picker</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/2355783#M34578</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/144457"&gt;@andres777&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can please share the code source for this component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need this please help&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 11:15:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-To-implement-Date-Range-Picker/m-p/2355783#M34578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-23T11:15:12Z</dc:date>
    </item>
  </channel>
</rss>

