title: How to pass array values to function onChange from input field?
body: <p>I am calling a function named "VizDateRange" which receives two parameters when dates are selected and these selected values should pass as two values but the selected dates are in a weird format which comes out as 02/01/2017-06/19/2017 as one value. So,in order to pass it as two values, how should I proceed? </p>
  
  <p>//HTML</p>
  
  <pre><code>&lt;div class="input-group date" data-provide="datepicker" name="" title="Select date range"&gt;
              &lt;input type="text" id="daterange" class="form-control" onChange=VizFilter(this.val().split(" - "))&gt;  //this is not working obviously. 
          &lt;/div&gt;
  </code></pre>
  
  <p>//calling daterangepicker which is bootstrap's date range plugin</p>
  
  <pre><code>   $(document).ready(function () {
              var dp = $('#daterange').daterangepicker({
  
                  "startDate": "02/06/2017", setting the limit for min
                  "endDate": "06/19/2017"setting the limit for max
              }
  
  
              )
  
          });
  </code></pre>
  
  <p>//the output is </p>
  
  <p>02/01/2017-06/19/2017</p>
  
  <p>// but what I need is "02/01/2017","06/19/2017" in order to pass it to VizDateRange function.</p>
  
  <p>//so I can use split (" - ") to turn it to array but how to pass this onChange or onClick from input field?</p>
  
  <p>//the function should get called onChange or onCLick and it asks for two values, it receives two parameters</p>
  
  <pre><code> function vizDateRange(minDate,maxDate)
  
              {
                  sheet = viz0.getWorkbook().getActiveSheet();
                  worksheetsArray = sheet.getWorksheets();
                  for (var i = 0; i &lt; worksheetsArray.length; i++) {
                      worksheetsArray[i].applyRangeFilterAsync("WEEK(DCM Date)", {
                          min: new Date(minDate),
                          max: new Date(maxDate)
  
                      });
                  }
  };
  </code></pre>
  
  <p>//here is jsfiddle </p>
  
  <p><a href="https://jsfiddle.net/u4t1rebs/" rel="nofollow noreferrer">https://jsfiddle.net/u4t1rebs/</a></p>