title: prevent user selecting date range in which there is a disabled date in between
body: <p>I know my question already answer <a href="https://stackoverflow.com/questions/23738226/how-to-prevent-selecting-date-range-in-which-there-is-a-disabled-date-in-between">like this</a>, but I still confused with that code. </p>
  
  <p>I just want user cannot choose selecting date range which there is disabled date between, this is <a href="https://i.stack.imgur.com/XjPxC.jpg" rel="nofollow noreferrer">screenshoot my date range picker</a> , so if user selecting with disable date then show error or notification information.</p>
  
  <p>and this my javascript</p>
  
  <pre class="lang-js prettyprint-override"><code>jQuery(function($) {
    $("#daterange").daterangepicker({
      isInvalidDate: function(date) {
        var dateRanges = [{
            'start': moment('2017-10-10'),
            'end': moment('2017-10-15')
          },
          {
            'start': moment('2017-10-25'),
            'end': moment('2017-10-30')
          },
          {
            'start': moment('2017-11-10'),
            'end': moment('2017-11-15')
          },
          {
            'start': moment('2017-11-25'),
            'end': moment('2017-11-30')
          },
          {
            'start': moment('2017-12-10'),
            'end': moment('2017-12-15')
          },
          {
            'start': moment('2017-12-25'),
            'end': moment('2017-12-30')
          },
          {
            'start': moment('2018-01-10'),
            'end': moment('2018-01-15')
          },
          {
            'start': moment('2018-01-25'),
            'end': moment('2018-01-30')
          },
          {
            'start': moment('2018-02-10'),
            'end': moment('2018-02-15')
          },
          {
            'start': moment('2018-02-25'),
            'end': moment('2018-02-30')
          }
        ];
        return dateRanges.reduce(function(bool, range) {
          return bool || (date &gt;= range.start &amp;&amp; date &lt;= range.end);
        }, false);
      }
    });
  });
  </code></pre>
  
  <p>and this <a href="https://codepen.io/anon/pen/ayxLeL" rel="nofollow noreferrer">the fiddle</a></p>
  
  <p>Please your suggestion..</p>