title: daterangepicker select range within one month
body: <p>Using this <a href="http://www.daterangepicker.com/" rel="nofollow noreferrer">http://www.daterangepicker.com/</a></p>
  
  <p>How to use daterangepicker to select range from only one month.
  Enabling <code>singleDatePicker: true</code> makes it onlt date picker, but I need range for one month.</p>
  
  <p>i.e. for jan 1 2017 to jan 15 2017. or any range within a month.</p>
  
  <p>I have tried</p>
  
  <pre><code>"dateLimit": {
      "month": 1
   },
  </code></pre>
  
  <p>But it select jan 1 to 31 and feb 1 also.</p>
  
  <p>If not possible please suggest an alternative.</p>
  
  <p><strong>Edit (Current Code)</strong></p>
  
  <pre><code>function cb(start, end) {
              $('#daterange span').html(start.format('MMM D, YYYY') + ' - ' + end.format('MMM D, YYYY'));
  
              enroll_date_start.value = start.format('YYYY-MM-DD');
              enroll_date_end.value   = end.format('YYYY-MM-DD');
          }
  
          $('#daterange').daterangepicker({
              maxDate: moment(),
  
              "dateLimit": {
                  "month": 1
              },
              ranges: {
                 'Today': [moment(), moment()],
                 'This Month': [moment().startOf('month'), moment().endOf('month')],
                 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
              }
          }, cb);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/uFpeQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFpeQ.png" alt="enter image description here"></a></p>