[英]Filter data using daterangepicker angularjs
I am using ng-bs-daterangepicker and I'm having trouble filter when I select start date
and end date
. 我正在使用ng-bs-daterangepicker ,选择
start date
和end date
时遇到了麻烦。
Here's a piece of my code
: 这是我的一部分
code
:
<input type="daterange" ng-model="dates" ranges="ranges">
<tr ng-repeat="item in items">
<td>{{created_date|date:'dd/MM/yyyy'}}</td>
</tr>
My JSON
data: 我的
JSON
数据:
[
{
"created_date": 1469017951592
},
{
"created_date": 1469017951592
},
{
"created_date": 1469017951592
},
{
"created_date": 1469017951592
}
]
According to the documentation in ng-bs-datepicker , you can put the min-date and max-date attributes. 根据ng-bs-datepicker中的文档,您可以放置min-date和max-date属性。
<input
type="daterange"
ng-model="dates"
min-date="2013-09-10"
max-date="2013-09-25">
You can also choose a special range that takes an object having with 'Special Range' key and another object with startDate and endDate as value: 您还可以选择一个特殊范围,该范围采用具有“特殊范围”键的对象和另一个具有startDate和endDate作为值的对象:
"{'Special Range':{'startDate': '2013-09-2', 'endDate': '2013-09-5'}}"
Additionally, you can use the two links below for demo: 此外,您可以使用以下两个链接进行演示:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.