Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeInputs not working correctly as Filters #7540

Closed
ZachSelindh opened this issue Apr 13, 2022 · 2 comments · Fixed by #7551
Closed

DateTimeInputs not working correctly as Filters #7540

ZachSelindh opened this issue Apr 13, 2022 · 2 comments · Fixed by #7551
Labels

Comments

@ZachSelindh
Copy link
Contributor

ZachSelindh commented Apr 13, 2022

What you were expecting:
DateTimeInput components to work correctly as list filter components

What happened instead:
Month and date/time values do not register properly when values change, and often reset entirely while picker is active.

Steps to reproduce:
Add a DateTimeInput as a Filter component, then try to use the date picker to select a value.

Related code:
https://codesandbox.io/s/cool-sound-pdlsh4 Check the published_at filter on the Posts list view.

Environment

  • React-admin version: 4.0.0.
  • Last version that did not exhibit the issue (if applicable): 3.19.10
  • React version: 17.0.2
  • Browser: Chrome
  • Stack trace (in case of a JS error):
@WiXSL WiXSL added the bug label Apr 14, 2022
@WiXSL
Copy link
Contributor

WiXSL commented Apr 14, 2022

Reproduced. Thanks for the report!

@WiXSL WiXSL added needs more info and removed bug labels Apr 14, 2022
@WiXSL
Copy link
Contributor

WiXSL commented Apr 14, 2022

I don't think this is a bug.
The problem is that you are trying to filter a date value with a date-time filter

UPDATE: No, with the correct configuration of DateField with showTime={true} and a DateTimeInput filter, I still get the problem

UPDATE 2: Getting closer, the problem is the default parse function, If I remove it, it stops misbehaving

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants