title: How set attribute in livewire datepicker?
body: <p>In livewire 1.3 app looking at DatePicker example at <a href="https://laravel-livewire.com/docs/alpine-js" rel="nofollow noreferrer">https://laravel-livewire.com/docs/alpine-js</a>
  I can not see how to set custom parameter to and to use it when date is selected?
  I need to put into hidden input formated date for saving in db.
  I add 1 parameter in attributes:</p>
  <pre><code>&lt;x-date-picker
      wire:model=&quot;start_date&quot;
      id=&quot;start_date&quot;
      autocomplete=&quot;off&quot;
      attributes=&quot;{hidden_element:'hidden_start_date'}&quot;
  /&gt;
  </code></pre>
  <p>and in resources/views/components/date-picker.blade.php :
  and try to read in in date selection event:</p>
  <pre><code>&lt;div&gt;
      &lt;input
          x-data
          x-ref=&quot;input&quot;
          x-init=&quot;new Pikaday({
              field: $refs.input,
              format:'M/D/YYYY',
              onSelect: function() {
                  console.log(this.el); // that shows html code of datepicker
                  console.log('getAttribute:');
                  console.log(this.el.getAttribute('hidden_element')); // shown null
                  
                  $( this.el.getAttribute('hidden_element') ).val( dateToMySqlFormat(this._d) );
                  // code above does not work !
              }
          })&quot;
          type=&quot;text&quot;
          {{ $attributes }}
      &gt;
  &lt;/div&gt;
  </code></pre>
  <p>Which is the valid way ?</p>
  <p>Thanks!</p>