title: How to make flatpickr datepicker reactive in livewire / alpinejs app?
body: <p>In my laravel 7 /livewire 1.3 / alpinejs 2 project
  I added flatpickr datepicker from <a href="https://flatpickr.js.org" rel="noreferrer">https://flatpickr.js.org</a>
  datepicker works ok, but reactive does not work. In the code below
  $current_operation_date - public var in the component and is is modified ok
  but alpine var operation_date is not changed when in datepicker value is selected:</p>
  <pre><code>&lt;div&gt;        
      $current_operation_date::{{$current_operation_date}}&lt;BR&gt;
      operation_date::&lt;div x-html=&quot;operation_date&quot;&gt;&lt;/div&gt;
      &lt;!-- The line above is not modified when in datepicker value is selected --&gt;
  
      &lt;div x-data=&quot;{ operation_date: '{{$current_operation_date}}'}&quot;&gt;
          &lt;input
              type='text'
              id=&quot;flatpickr_operation_date&quot;
              wire:model.lazy=&quot;current_operation_date&quot;
  
              x-model=&quot;operation_date&quot;
              x-on:blur=&quot;$dispatch('input', operation_date)&quot;
              class=&quot;form-control editable_field&quot;
          /&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  
  
  @section('scripts')
      &lt;script&gt;
  
  
          $(document).ready(function(){
  
              var fp = flatpickr(document.querySelector('#flatpickr_operation_date'), {
                  enableTime: false,
                  dateFormat: 'Y-m-d',
                  altFormat: &quot;F j, Y&quot;,
                  altInput: true,
                  inline: false,
                  locale: &quot;es&quot;,
                  &quot;minDate&quot;: &quot;2020-7-12&quot;,
                  &quot;maxDate&quot;: &quot;2020-9-12&quot;,
                  defaultDate: [&quot;2020-9-10&quot;],
                  onChange: function(selectedDates, dateStr, instance) {
                      console.log('selectedDates::')
                      console.log(selectedDates) //valid
                      
                      console.log('date: ', dateStr);
                  }
              });
  
          });
      
      
      
      &lt;/script&gt;
  @endsection
  
  &lt;style&gt;
     ...
  </code></pre>
  <p>If there is a way to make it reactive ?</p>
  <p>Thanks!</p>