title: Set dates for jQuery Date Range Picker from input values
body: <p><a href="https://github.com/longbill/jquery-date-range-picker" rel="nofollow">https://github.com/longbill/jquery-date-range-picker</a></p>
  
  <p>I have everything working quite well but I can't seem to get the picker to use the default values that I set in the . There are two inputs, a start date and end date. I have a value="" with a date in both which should be the default date for the datepicker. Then the user has the ability to change those dates. </p>
  
  <p>I've played with a few different ideas but I can't get anything to grab the input's value attribute. Any insight would be appreciated. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;div class="datepicker-to-from"&gt;
      &lt;input type="date" id="startTimestamp" class="date-picker" value="11/18/2012 05:45 AM"&gt;
  
      &lt;input type="date" id="endTimestamp" class="date-picker" value="04/09/2014 5:00 PM"&gt;
  &lt;/div&gt;
  
  $('.datepicker-to-from').dateRangePicker({
      format: 'MM/DD/YYYY HH:mm A',
      showShortcuts: false,
      time: {
          enabled: true
      },  
      getValue: function(){
          $('#startTimestamp').val() + ' to ' + $('#endTimestamp').val();
      },
      setValue: function(){
          $('#startTimestamp').val();
          $('#endTimestamp').val();
      },
      startDate: $('#startTimestamp').val()
  });
  </code></pre>
  
  <p><strong>UPDATE 4/10/2015:</strong>
  After help from both andybeli and The F, I solved the problem. The final JS code looks like this for those who run into a similar situation. </p>
  
  <pre><code>$('.datepicker-to-from').dateRangePicker({
      format: 'MM/DD/YYYY HH:mm A',
      showShortcuts: false,
      time: {
          enabled: true
      },  
      setValue: function(s,s1,s2){
          $('#startTimestamp').val(s1);
          $('#endTimestamp').val(s2);
      },
  }); 
  
  var startDate = $('#startTimestamp').val();
  var endDate = $('#endTimestamp').val();
  
  $('.datepicker-to-from').data('dateRangePicker').setDateRange(startDate,endDate);
  </code></pre>