Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

Users requested the ability to filter pivot table data by date ranges. Currently no date filtering options exist beyond the standard pivot table value checkboxes, which becomes impractical with many individual dates.

Changes

Date field enhancement

  • Extract standard Trello date fields (due date, last activity) into pivot data
  • Generate derived fields from all dates: Year, Month, Quarter, Year-Month for grouping/filtering
  • Apply same derivation to custom date fields automatically

Date range filter UI

  • Toggle button (top-right) shows/hides filter panel
  • Dropdown selector auto-populated with all date fields
  • jQuery UI datepickers for from/to date selection
  • Filter state maintained until explicitly cleared

Filter implementation

// Filter logic handles ISO and YYYY-MM-DD formats, partial ranges
const applyDateRangeFilter = (data, field, fromDate, toDate) => {
    if (!field || (!fromDate && !toDate)) return data;
    
    return data.filter(row => {
        const dateValue = row[field];
        if (!dateValue) return false;
        
        let dateStr = dateValue.includes('T') 
            ? dateValue.split('T')[0] 
            : dateValue;
        
        if (fromDate && dateStr < fromDate) return false;
        if (toDate && dateStr > toDate) return false;
        return true;
    });
};

Files modified

  • src/html/modal.html - Added filter UI and styling (also fixed malformed <link> tag)
  • src/js/modal.js - Date extraction, filtering logic, event handlers

Screenshot

Date Filter UI

The filter works independently or combined with standard pivot filters. Derived fields (Quarter, Year-Month) enable temporal grouping patterns that weren't previously possible.

Original prompt

This section details on the original issue you should resolve

<issue_title>Request for date filter options</issue_title>
<issue_description>Hello,
as far I noticed, there are currently no options to filter between dates in this pivot table.
Can this functionality be added easily?

Best regards
Robin</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add date filter options for pivot table Add date range filtering and derived date fields to pivot table Nov 10, 2025
Copilot AI requested a review from jumpingrabbit November 10, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Request for date filter options

2 participants