title: How to use Date Range Picker to pick a date and put it in a input
body: <p>I am trying to use this addon <a href="http://www.daterangepicker.com/" rel="nofollow">http://www.daterangepicker.com/</a> but i can't figure out how retreive the value in an input </p>
  
  <p>In this example it show us how to do it </p>
  
  <pre><code>&lt;input type="text" name="birthdate" value="10/24/1984" /&gt;
  
  &lt;script type="text/javascript"&gt;
  $(function() {
      $('input[name="birthdate"]').daterangepicker({
          singleDatePicker: true,
          showDropdowns: true
      }, 
      function(start, end, label) {
          var years = moment().diff(start, 'years');
          alert("You are " + years + " years old.");
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The value selected by user will go to the input <code>birthdate</code> </p>
  
  <p>But in this example (the one that i want to use ) </p>
  
  <pre><code>&lt;div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"&gt;
      &lt;i class="glyphicon glyphicon-calendar fa fa-calendar"&gt;&lt;/i&gt;&amp;nbsp;
      &lt;span&gt;&lt;/span&gt; &lt;b class="caret"&gt;&lt;/b&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  $(function() {
  
      function cb(start, end) {
          $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
      }
      cb(moment().subtract(29, 'days'), moment());
  
      $('#reportrange').daterangepicker({
          ranges: {
             'Today': [moment(), moment()],
             'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
             'Last 7 Days': [moment().subtract(6, 'days'), moment()],
             'Last 30 Days': [moment().subtract(29, 'days'), moment()],
             'This Month': [moment().startOf('month'), moment().endOf('month')],
             'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
          }
      }, cb);
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>There is no input </p>
  
  <p>I don't know how to retreive the input ! </p>