<?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 datepicker update results on close/type error in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200259#M5544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I have&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;recently updated&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;a web app to WAB 2.4 that pulls black bear sighting data from a server when queried. The query widget has 7 parameters with which to filter results, two of which are a start date and end date. I am using the jquery datepicker for the dates, but I want the app to automatically update the results when the calendar is closed. I already have an "onchange:" event set in the widget html, which works fine for the other parameters, but not with the datepicker. I have been trying to use the onClose method from within the datepicker object to search the database and update the results when the calendar is closed, but when I try and call a function that has been defined outside of the $(document).ready(function), I get a type error: 'this._BBearFetch is not a function'. I am fairly sure this is a scope issue, but I cannot figure out how to solve this. The function I am trying to call is defined as a value in the clazz object, and I located the datepicker in the startup: function(). I hope this makes sense, but I have attached a code snippet for more clarity. Thanks for any advice, I am sure I am missing something obvious.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Dec 2017 15:02:14 GMT</pubDate>
    <dc:creator>FranklinAlexander</dc:creator>
    <dc:date>2017-12-27T15:02:14Z</dc:date>
    <item>
      <title>datepicker update results on close/type error</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200259#M5544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I have&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;recently updated&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;a web app to WAB 2.4 that pulls black bear sighting data from a server when queried. The query widget has 7 parameters with which to filter results, two of which are a start date and end date. I am using the jquery datepicker for the dates, but I want the app to automatically update the results when the calendar is closed. I already have an "onchange:" event set in the widget html, which works fine for the other parameters, but not with the datepicker. I have been trying to use the onClose method from within the datepicker object to search the database and update the results when the calendar is closed, but when I try and call a function that has been defined outside of the $(document).ready(function), I get a type error: 'this._BBearFetch is not a function'. I am fairly sure this is a scope issue, but I cannot figure out how to solve this. The function I am trying to call is defined as a value in the clazz object, and I located the datepicker in the startup: function(). I hope this makes sense, but I have attached a code snippet for more clarity. Thanks for any advice, I am sure I am missing something obvious.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2017 15:02:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200259#M5544</guid>
      <dc:creator>FranklinAlexander</dc:creator>
      <dc:date>2017-12-27T15:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: datepicker update results on close/type error</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200260#M5545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Franklin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;It definitely is a scope issue but I don't use jQuery in widgets and not inline functions like that so the best I can do is take a educated guess at the resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onClose&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newDate&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datepicker&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;$&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;data&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'previous'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; newDate&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;_BBearFetch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200260#M5545</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: datepicker update results on close/type error</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200261#M5546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert. I am still getting the same error, but I think you are on the right track and at least it puts me on the right path!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Dec 2017 21:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200261#M5546</guid>
      <dc:creator>FranklinAlexander</dc:creator>
      <dc:date>2017-12-27T21:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: datepicker update results on close/type error</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200262#M5547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it working.The problem seemed to be that it was buried too deeply inside 3 tiers of functions. I created a function called _datepicker in the clazz object&amp;nbsp;containing the datepicker jquery code, then referenced it in the startup function. I also think that being inside the $(document).ready(function) was causing some scope issues, so I am not using it.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2017 15:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/datepicker-update-results-on-close-type-error/m-p/200262#M5547</guid>
      <dc:creator>FranklinAlexander</dc:creator>
      <dc:date>2017-12-28T15:55:12Z</dc:date>
    </item>
  </channel>
</rss>

