jQWidgets Forums
jQuery UI Widgets › Forums › Grid › time Range in grid
Tagged: angular grid, bootstrap grid, date range, javascript grid, jquery grid, jqwidgets grid, jqxgrid, Time Range
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 9 years, 5 months ago.
-
Authortime Range in grid Posts
-
Hello,
Can anyone help me i want to add time range filter in grid.
and also print value of date range filter column in label.Hello Dave_1,
We have similar theme:
http://www.jqwidgets.com/community/topic/jqxgrid-date-filter/
and especially this demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filtering.htm?web
About how to print information could usegetfilterinformation
method from Grid.
http://jsfiddle.net/jqwidgets/uyvqL/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThanks Hristo
am facing problem in jqxRangeSelector .
i have two columns start time and end time and i want to perform filter on it , it is not returning any value to grid.$("#rangeSelector").jqxRangeSelector({ width: 750, height: 100, min: data.StartTime, max: data.EndTime, range: { from: data.StartTime, to: data.EndTime }, majorTicksInterval: { hours: 4 }, minorTicksInterval: { minutes: 30 }, labelsFormat: 'hh:mm tt', markersFormat: 'hh:mm tt' }); var applyFilter = function (from, to) { $("#jqxgrid1").jqxGrid("clearfilters"); filtertype = "datefilter"; var filtergroup = new $.jqx.filter(); var filter_or_operator = 0; var filtervalueFrom = from; var filterconditionFrom = "GREATER_THAN_OR_EQUAL"; var filterFrom = filtergroup.createfilter(filtertype, filtervalueFrom, filterconditionFrom); filtergroup.addfilter(filter_or_operator, filterFrom); var filtervalueTo = to; var filterconditionTo = "LESS_THAN_OR_EQUAL"; var filterTo = filtergroup.createfilter(filtertype, filtervalueTo, filterconditionTo); filtergroup.addfilter(filter_or_operator, filterTo); $("#jqxgrid1").jqxGrid("addfilter", "StartTime", filtergroup); $("#jqxgrid1").jqxGrid("applyfilters"); }; // update filter on "change" event. $("#rangeSelector").on("change", function (event) { var range = event.args; var min = $("#rangeSelector").jqxRangeSelector("min"); var max = $("#rangeSelector").jqxRangeSelector("max"); min = new Date(min); max = new Date(max); if (range.from.getTime() == min.getTime() && range.to.getTime() == max.getTime()) { $("#jqxgrid1").jqxGrid("clearfilters"); } else { applyFilter(range.from, range.to); }; });
Hello Dave_1,
Please take a look this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filterrow.htm?arctic
(in column ‘Ship Date’ you could see this functionality)Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.