<?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 Setting Properties within a class method ArcGIS API 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-properties-within-a-class-method-arcgis/m-p/1120682#M75412</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may be thinking about this all wrong, but I cannot figure out why I cant set a property based on the value of a triggered event within a custom widget class (my event is a date input).&amp;nbsp;&lt;/P&gt;&lt;P&gt;what am I getting wrong here? I know this is probably a simple solution... but I don't get why it wouldn't be possible to set a value within a class when an html element belongs to that class..? It doesn't make sense for me to move the date selector out of the class... because it is central to the widgets functionality. How do I set that value?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// declared property im trying to change
@property()
ed:String = this.TodayPretty; // setting to another property I have made as default

private _eDateHandler(e:Event) { 
    let target = e.currentTarget as HTMLInputElement;
    console.log(`changed ed to ${target.value}`)
    this.ed = target.value // fails to change the state of the widget
 }

// further down in HTML....

&amp;lt;input 
  type="date" 
  id="ed" 
  name="End Date" 
  onchange={this._eDateHandler}
  value={this.TodayPretty}
&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;br/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 04:44:21 GMT</pubDate>
    <dc:creator>ZachPorteous</dc:creator>
    <dc:date>2021-11-29T04:44:21Z</dc:date>
    <item>
      <title>Setting Properties within a class method ArcGIS API 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-properties-within-a-class-method-arcgis/m-p/1120682#M75412</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may be thinking about this all wrong, but I cannot figure out why I cant set a property based on the value of a triggered event within a custom widget class (my event is a date input).&amp;nbsp;&lt;/P&gt;&lt;P&gt;what am I getting wrong here? I know this is probably a simple solution... but I don't get why it wouldn't be possible to set a value within a class when an html element belongs to that class..? It doesn't make sense for me to move the date selector out of the class... because it is central to the widgets functionality. How do I set that value?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// declared property im trying to change
@property()
ed:String = this.TodayPretty; // setting to another property I have made as default

private _eDateHandler(e:Event) { 
    let target = e.currentTarget as HTMLInputElement;
    console.log(`changed ed to ${target.value}`)
    this.ed = target.value // fails to change the state of the widget
 }

// further down in HTML....

&amp;lt;input 
  type="date" 
  id="ed" 
  name="End Date" 
  onchange={this._eDateHandler}
  value={this.TodayPretty}
&amp;gt;&amp;lt;/input&amp;gt;&amp;lt;br/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 04:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-properties-within-a-class-method-arcgis/m-p/1120682#M75412</guid>
      <dc:creator>ZachPorteous</dc:creator>
      <dc:date>2021-11-29T04:44:21Z</dc:date>
    </item>
  </channel>
</rss>

