Open mauro-rogledi opened 11 months ago
I don't see this having to do with the locale. But if you use equals for dates, they have to be the exact same dates. You might even want to provide your own custom filterFn
for a date equality comparison.
Hi @KevinVandy . It's not caused by the locale but by the user's computer timezone. I am in the timezone +1 hour to UTC (Berlin). When I fill the date March 20, 2014 in the "Start Date" column of your demo at https://www.material-react-table.com/docs/examples/advanced, the table doesn't show anything, even though there is exactly such a record. Don't be misled by displaying 20.3.2014 ... we in Europe have it displayed that way.
and filtering:
@KevinVandy Do you plan to fix this issue?
@mauro-rogledi How did you solved this issue? Or are you waiting for fixing this bug?
material-react-table version
2.0.3
react & react-dom versions
18.2.0
Describe the bug and the steps to reproduce it
Trying to filter by date, with
filterFn: "lessThanOrEqualTo",
with italian language gives an incorrect result: Enter "16/10/1960" and the table is empty. Enter "17/10/1960" and the table will appear in the row with the date "16/10/1960".with
filterFn: "equals"
the table is always emptyMinimal, Reproducible Example - (Optional, but Recommended)
https://codesandbox.io/s/react-table-fkjzdc or with an your example https://codesandbox.io/p/sandbox/bugfilterdata-wl4ym4
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms