jQuery UI Widgets Forums Grid Date Filtering

Tagged: 

This topic contains 6 replies, has 2 voices, and was last updated by  Peter Stoev 14 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Date Filtering #6289

    shimmoril
    Participant

    Is there any support for filtering between dates in the grid? For example, I’d like to pull all records between 01-Jan-12 and 15-Feb-12. When I open the filter menu, there is no between or greater than/less than option. The data type of my column is set to date.

    Date Filtering #6290

    Peter Stoev
    Keymaster

    Hi shimmoril,

    In the Date columns, there is ‘Greater Than’ and ‘Less Than’ options. See our Filtering sample.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Date Filtering #6297

    shimmoril
    Participant

    My date column does not have greater than or less than options. My date is in a different format than yours – 24-Jul-12 and the format is not being set in the grid. Would this affect the filtering?

    Date Filtering #6298

    Peter Stoev
    Keymaster

    Hi shimmoril,

    Providing a small sample in which this can be observed locally will be appreciated. You can send the sample to support@jqwidgets.com including your license key in the support e-mail. I suppose that you have one because you are positing in the Forum more than 30 days which is the evaluation period of our software.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Date Filtering #6304

    shimmoril
    Participant

    Can you provide the contents or location of generatedata.js? I’m trying to work off your example from my other thread (http://www.jqwidgets.com/community/topic/horizontal-scrolling-filters/#post-6303), but I’m having difficulty creating the data.

    Date Filtering #6306

    shimmoril
    Participant

    Further testiing indicates that there is a problem specifically with the dd-mmm-yyyy format. Data in the dd/mm/yyyy or mm/dd/yyyy format displays proper filter options (ie. greater than/less than). Possibly this is related to the previous filtering issue I brought up: http://www.jqwidgets.com/community/topic/empty-cell-filtering/.

    Date Filtering #6307

    Peter Stoev
    Keymaster

    Hi shimmoril,

    Here’s a working sample with dd-MMM-yyyy format. The format is dd-MMM-yyyy because mmm is for minutes – read here: jquery-grid-cellsformatting.htm.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="generatedata.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    var data = generatedata(500);
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    $("#jqxgrid").jqxGrid(
    {
    width: 670,
    source: source,
    filterable: true,
    sortable: true,
    columns: [
    { text: 'First Name', datafield: 'firstname', width: 100 },
    { text: 'Last Name', datafield: 'lastname', width: 100 },
    { text: 'Product', datafield: 'productname', width: 180 },
    { text: 'Order Date', datafield: 'date', width: 100, cellsformat: 'dd-MMM-yyyy' },
    { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' },
    { text: 'Unit Price', datafield: 'price', cellsalign: 'right', cellsformat: 'c2' }
    ]
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id="jqxgrid">
    </div>
    </body>
    </html>

    We can’t reproduce the reported issue locally with the latest version of jQWidgets. We’ll need to debug your scenario and providing a small working sample which demonstrates the reported behavior will be appreciated. You can send the sample to support@jqwidgets.com.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.