Describe the bug
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.
Pull Request Link
#8505
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-oumlqotx?file=src%2FApp.vue
Environment
Happens on any environment
Vue version
3.5.22
PrimeVue version
4.4.1
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
- Create a
DataTable with a Column for dates.
- Add a filter for the column
- Populate table with
string data
- Attempt to filter by date
- Console error and table does not filter
Expected behavior
Table would filter by the date provided, even if it is a string type.
Describe the bug
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.
Pull Request Link
#8505
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-oumlqotx?file=src%2FApp.vue
Environment
Happens on any environment
Vue version
3.5.22
PrimeVue version
4.4.1
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
DataTablewith aColumnfor dates.stringdataExpected behavior
Table would filter by the date provided, even if it is a
stringtype.