title: Observe Change in Vue js model when input updated by javascript function
body: <p>I am using Date Range Picker to select to dates now when I select the dates, I update the inputs with dates value respectively. </p>
  
  <p>The inputs I have binded with v-model and created a function in watch attribute of component to observe the change in model.</p>
  
  <p>But when the inputs are updated with the javascript function no change can be observed in the model but the value of my input fields are updated.</p>
  
  <pre><code>// My Input Fields
  
  &lt;input type="text" name="updateStartDate" v-model="updateDateRange.start"&gt;
   &lt;input type="text" name="updateEndDate" v-model="updateDateRange.end"&gt;
  
  
  
  //My javascript Function
  $('input[rel=dateRangePickerX]').daterangepicker({
                          'autoApply': true,
                          'drops': 'up',
                          'startDate': moment().add(90, 'days').calendar(),
                          'endDate': moment().add(97, 'days').calendar(),
                          locale: { cancelLabel: 'Clear' }
                      },
                      function (start, end, label) {
                          $('input[name="updateStartDate"]').val(start.format('MM/DD/YYYY'));
                          $('input[name="updateEndDate"]').val(end.format('MM/DD/YYYY'));
                      });
  
  // My watch attribute in Component
  watch : {
          'updateDateRange.end' : function (val) {
              console.log('In Watch Function');
              console.log(this.dateRanges);
              if(val != '' &amp;&amp; this.updateDateRange.start != '' &amp;&amp; this.updateDateRangeIndex != ''){
                  console.log(val);
                  console.log(this.updateDateRange.start);
                  console.log(this.updateDateRangeIndex);
                  this.dateRanges[this.updateDateRangeIndex] = this.updateDateRange;
                  this.updateDateRangeIndex = '';
                  this.updateDateRange.start = '';
                  this.updateDateRange.end = '';
                  console.log(this.dateRanges);
              }
          }
      }
  </code></pre>