如何在DataTables中过滤日期范围? [英] How do I filter date range in DataTables?
问题描述
我有一个包含乘坐信息的大型dataTable。每行都有以下格式的开始日期时间和结束日期时间(yyyy-mm-dd HH:mm:ss)。如何使用datepicker在dataTables中设置过滤范围?我想要一个只选择一天而不是时间的日期选择器。我到处寻找正确的答案,但我找不到它。在此先感谢您的帮助。
I have a large dataTable which contains ride information. Every row has a start datetime and an end datetime of the following format(yyyy-mm-dd HH:mm:ss). How can I use a datepicker for setting a filter range in dataTables? I want to have a datepicker which only selects a day and not the time. I've searched everywhere for the proper answer but I couldn't find it. Thanks in advance for helping.
例如,我希望通过选择(01-07-2016 - 31-07-2016)来查看7月的所有行。
For example I want to see all rows of July by selecting (01-07-2016 - 31-07-2016).
推荐答案
这是 DataTable
,包含Single DatePicker
asfrom日期过滤器
Here is DataTable
with Single DatePicker
as "from" Date Filter
这是 DataTable
两个 DatePickers
for DateRange(往返)过滤器
Here is DataTable
with Two DatePickers
for DateRange (To and From) Filter
这篇关于如何在DataTables中过滤日期范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!