Angularjs Filtering the Field Based on Start Date and End Date?
<p>Hi all I want to filtering the items like (Start and End Date)  which is based on <code>Due_date</code> using the daterange functionality in meanjs app. then I tried many ways but unable to get the solution if any one knows the solution please help me..... <a href="http://plnkr.co/edit/QuJvCXFpKbwVd0OlkHZ2?p=preview" rel="nofollow">My Plunk</a></p>

<ul>
<li><p>Please look at my plunker to reference.</p></li>
<li><p>I Have displaying <code>Due_date</code>, so this is the field I want to use for filtering. </p></li>
<li><p>I have used some functionality to add <code>invoice_Date</code> and <code>terms</code>, which provides the answer like <code>Due_date</code>. <strong>for exmple:-</strong> invoice_date : <code>2016-09-10</code>, terms : <code>6</code>, the answer I got Due_date : <code>16-09-2016</code></p></li>
<li><p>so what I excatly looking for , I want to filter the <code>Due_date</code> as start date and end date : <strong>for example:-</strong> if we select start date like <code>16-09-2016</code> and end date is <code>25-09-2016</code> in table these two transaction only need to display or filter... so I have used daterange filter to achieve this solution, but unable to get the solution please help us. </p></li>
<li><p>the daterange filter is working perfectly if we using ng_module is <code>invoice_date</code>, but we don't know how to  filter the <code>Due_date</code> filed please help us.... <a href="http://plnkr.co/edit/QuJvCXFpKbwVd0OlkHZ2?p=preview" rel="nofollow">My Plunker</a></p></li>
</ul>

<p><strong>Controller:</strong></p>

<pre><code>.filter('dateRange', function() {
     return function(records, dateKey, from, to) {
       return records.filter(function(record) {
         return !moment(record[dateKey], 'YYYY-MM-DD').isBefore(moment(from))
                &amp;&amp; !moment(record[dateKey], 'YYYY-MM-DD').isAfter(moment(to));
            });
        }
    })
</code></pre>

<p><strong>Html:</strong></p>

<pre><code>&lt;input type="date" class="form-control" name="from" ng-model="from"&gt;

&lt;input type="date" class="form-control" name="to" ng-model="to"&gt;
</code></pre>

<p><strong>Filter:-</strong></p>

<pre><code>ng-repeat="data in  record | dateRange : 'invoice_date' : from : to"
</code></pre>

<p>This below the filed need to filter in table:-</p>

<p><strong>Due_date:-</strong></p>

<pre><code>&lt;td&gt; {{addDays(data.invoice_date,data.terms) | date:'dd-MM-yyyy'}}&lt;/td&gt;
</code></pre>

<ul>
<li>I have created plunker for referrence:- <a href="http://plnkr.co/edit/QuJvCXFpKbwVd0OlkHZ2?p=preview" rel="nofollow">My plunker</a></li>
</ul>