ICEfaces
  1. ICEfaces
  2. ICE-10446

ace:dataTable - Add ability to filter Date values via a date picker/range

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Feature Request: If a dataTable column contains Date objects, add the ability to select a date or a range of date to filter on.

        Issue Links

          Activity

          Hide
          Arturo Zambrano added a comment -

          r46043: added ability to filter date values via a date picker.

          Show
          Arturo Zambrano added a comment - r46043: added ability to filter date values via a date picker.
          Hide
          Arturo Zambrano added a comment -

          To use date filtering it is necessary to specify the new 'type' attribute to the column component and set it to 'date'. It's wasn't possible to determine the type of the column just based on the filterBy property. An initial attempt was made to deduce the type based on the first row, but when there are no rows or if the column value of the first row was null, there was no way to determine the type. For example, when trying to filter a date for which there are no matches. After that, the table component didn't render the calendar for the filter field of the date column. So, with this new attribute, we're starting to make ace:dataTable more aware of the value types it contains, as mobi:dataView does. Up to now, all filtering had been treated as a string.

          The commit above adds the ability to filter rows based on a single date. Adding ranges in general, whether they are date ranges or numeric ranges, would require major changes in our code. The main reasons are that the filterValue property of columns is of type String and can only hold one value. An idea is to add another attribute to the Column component called filterRange, which is associated to a special object containing two data values. Also, the Predicates would need to be modified to use two values or a new Predicate would need to be used. However, it's still not clear how things would work when using a global filter.

          Show
          Arturo Zambrano added a comment - To use date filtering it is necessary to specify the new 'type' attribute to the column component and set it to 'date'. It's wasn't possible to determine the type of the column just based on the filterBy property. An initial attempt was made to deduce the type based on the first row, but when there are no rows or if the column value of the first row was null, there was no way to determine the type. For example, when trying to filter a date for which there are no matches. After that, the table component didn't render the calendar for the filter field of the date column. So, with this new attribute, we're starting to make ace:dataTable more aware of the value types it contains, as mobi:dataView does. Up to now, all filtering had been treated as a string. The commit above adds the ability to filter rows based on a single date. Adding ranges in general, whether they are date ranges or numeric ranges, would require major changes in our code. The main reasons are that the filterValue property of columns is of type String and can only hold one value. An idea is to add another attribute to the Column component called filterRange, which is associated to a special object containing two data values. Also, the Predicates would need to be modified to use two values or a new Predicate would need to be used. However, it's still not clear how things would work when using a global filter.
          Hide
          Ken Fyten added a comment -

          New JIRA for general range filtering support makes sense, and this one can depend on the new one.

          Show
          Ken Fyten added a comment - New JIRA for general range filtering support makes sense, and this one can depend on the new one.
          Hide
          Arturo Zambrano added a comment -

          The range filtering capability was committed under ICE-10811.

          Show
          Arturo Zambrano added a comment - The range filtering capability was committed under ICE-10811 .

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: