title: Add value of date picker in HTML text input field
body: <p>Could someone please advise on how I could add the selected date (using a date picker) as the value of a HTML text input field? The date picker works correctly, but it currently only displays the selected date below the line:
  <code>&lt;div class=&quot;event-log&quot;&gt;Event logs:&lt;br&gt;&lt;/div&gt;</code>    and not as a value inside the text input field.</p>
  <p>Please find code below:</p>
  <pre><code>  &lt;button type=&quot;button&quot; class=&quot;simplepicker-btn&quot;&gt;Select date&lt;/button&gt;
    
      &lt;input id=&quot;myInput&quot; type=&quot;text&quot;&gt;&lt;/input&gt;
       
      &lt;div class=&quot;event-log&quot;&gt;Event logs:&lt;br&gt;&lt;/div&gt; 
      
    &lt;script&gt;
      let simplepicker = new SimplePicker({
        zIndex: 10
      });
  
   
      const $button = document.querySelector('.simplepicker-btn');
      const $eventLog = document.querySelector('.event-log');
      
      
      $button.addEventListener('click', (e) =&gt; {
        simplepicker.open();
      });
  
      // $eventLog.innerHTML += '\n\n';
      simplepicker.on('submit', (date, readableDate) =&gt; {
        $eventLog.innerHTML += readableDate + '\n';
      });
  
      simplepicker.on('close', (date) =&gt; {
        $eventLog.innerHTML += ''  + '\n';
      });
      
      
      var dateselected = &quot;09/08/2022&quot;;
  
      document.getElementById(&quot;myInput&quot;).value = dateselected;
  
    &lt;/script&gt;
  
  </code></pre>