subhra subhra - 2 years ago 65
AngularJS Question

Can not filter the data from as per date using Angular.js

I need one help.I need to filter data from list as per two date using Angular.js.My all code are present inside plunkr.There you can find i have list of 3 set of data.On the to i have two date field one is for

from date
and another is for
to date
. If user is selecting two date the list data will filter accordingly means the list data should view as per selecting dates from date field.Here i can not get that type of result.Here is code.Please help me to resolve this.

Answer Source

In script.js at line 25 change

getMidnight( + 24 * 3600 * 1000).getTime()


getMidnight(new Date( + 24 * 3600 * 1000).getTime()


For the comment, add these two line before return events.filter

from = getMidnight(from);

to = getMidnight(to).getTime() + (24 * 3600-1) * 1000;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download