Skip to content

fix(DataTable, Column): convert date inputs to Date object before comparing their strings#8505

Open
StevenReale wants to merge 1 commit into
primefaces:masterfrom
StevenReale:feature/dateFilteringGuardrails
Open

fix(DataTable, Column): convert date inputs to Date object before comparing their strings#8505
StevenReale wants to merge 1 commit into
primefaces:masterfrom
StevenReale:feature/dateFilteringGuardrails

Conversation

@StevenReale
Copy link
Copy Markdown

@StevenReale StevenReale commented Mar 19, 2026

DataTable Date column filters break if a) the column data are strings, which is common when collecting data from an API that transmits as JSON; or b) the filters use some input type other than DatePicker that does not return a Date object, such as a native <input type="date"> element.

This PR adds guardrails to FilterService.js that converts the inputs to Date objects before comparing them.

This PR resolves #8506

@StevenReale StevenReale marked this pull request as ready for review March 19, 2026 13:02
@StevenReale StevenReale changed the title Convert date inputs to Date object before comparing their strings fix(DataTable, Column): convert date inputs to Date object before comparing their strings Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date column filters cannot take in strings to compare

1 participant