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

[Bug]: DataGridDateColumn filter not working properly #5866

Open
blenke opened this issue Nov 21, 2024 · 1 comment
Open

[Bug]: DataGridDateColumn filter not working properly #5866

blenke opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
Type: Bug 🐞 Something isn't working Type: Possible Bug Needs to investigate more to see if it's an actual bug.

Comments

@blenke
Copy link

blenke commented Nov 21, 2024

Blazorise Version

1.6 1.7

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

https://blazorise.com/docs/extensions/datagrid/columns

Steps to reproduce & bug description

There seems to be an issue when using the filter on DataGridDateColumn , if the column contains date + time then it cannot filter. Happens both on default (datepicker) and native date selection. Only when datepicker is used it might work, then time can be entered in the filter but not picked. This can be seen on the blazorise demo page. The date of birth column has time included which cannot be selected in the filter. And when applying the filter the result is always empty.

Please also add more documentation for the datepicker option in DataGridDateColumn.

What is expected?

If only a date is choosen in the filter then only date should be compared and the time part should be ignored. Perhaps this requires an additional option in DataGridDateColumn

What is actually happening?

filter does not work properly

What browsers do you see the problem on?

Microsoft Edge, Chrome

Any additional comments?

I created a custom filter as a workaround which seems to fix it. However in some cases i noticed that the filter gets a time component when i do not expect it. The column value is DateOnly but it still shows the time in the filter. I will try to make a simple example to see where this goes wrong

@blenke blenke added the Type: Bug 🐞 Something isn't working label Nov 21, 2024
@David-Moreira
Copy link
Contributor

@stsrki thoughts?
I guess it kinda works as expected in the world of date time comparisons... since selecting a fitler of "2020-01-01" will be something like midnight, so selecting 2020-01-01 will not be able to display 2020-01-01 10:00 for instance (not with the standard filtering at least).
2020-01-01 00:00 != 2020-01-01 10:00

@David-Moreira David-Moreira added the Type: Possible Bug Needs to investigate more to see if it's an actual bug. label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working Type: Possible Bug Needs to investigate more to see if it's an actual bug.
Projects
None yet
Development

No branches or pull requests

3 participants