code: function(startDate, endDate) {
      var current = new Date(startDate);
      var end = new Date(endDate); 
      var dates = [];
  
      while(current <= end) {
  
          var m = current.getMonth() + 1;
          var d = current.getDate();
          var oneDate = [
              current.getFullYear(),
              m < 10 ? "0" + m : m,
              d < 10 ? "0" + d : d].join('-');
  
          dates.push(oneDate);
          current.setDate(current.getDate() + 1);
      }
  
      return dates;
  }
docs: define the function to get date range.
  getDates('05/01/2017', '05/15/2017');
  inclusive!