You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Describe the bug
Filtering on DateTime column does not work. I have also directly run the repo in local, and found the Filtering on DateTime does not work either.
To Reproduce
to create a simple page can reproduce
@page "/test"
@using BlazorTable
<div>
<Table TableItem="TestData" Items="TestDatas" PageSize="10">
<Column TableItem="TestData" Title="Id" Field="@(x => x.Id)" Sortable="true" Filterable="true" Width="auto" />
<Column TableItem="TestData" Title="Event DateTime" Field="@(x => x.EventDate)" Sortable="true" Filterable="true" Width="auto">
</Column>
</Table>
</div>
@code {
public List<TestData> TestDatas { get; set; } = new List<TestData>
{
new TestData {Id = 1, EventDate = DateTime.Now },
new TestData {Id = 2, EventDate = DateTime.Now.AddDays(1)},
new TestData {Id = 3, EventDate = DateTime.Now.AddDays(2)},
new TestData {Id = 4, EventDate = DateTime.Now.AddDays(3)},
new TestData {Id = 5, EventDate = DateTime.Now.AddDays(4)},
new TestData {Id = 6, EventDate = DateTime.Now.AddDays(5)}
};
public class TestData
{
public int Id { get; set; }
public DateTime EventDate { get; set; }
}
}
Expected behavior
filtering on DateTime column can work
The text was updated successfully, but these errors were encountered:
The filter for dates does work provided the value is exact:
..or if you used a Greater Than or Less Than this does work:
In your sample you're using a DateTime value with a time element. In this case a value of 2021-09-12T15:16:00Z won't be equal to 2021-09-21T00:00:00Z - these are not the equal.
I assume you'd like a date "Is Equal To" to apply a range, e.g. >= 2021-09-12 && < 2021-09-13 ?
I'd need to discuss with @IvanJosipovic to see if that is a good idea.
Describe the bug
Filtering on DateTime column does not work. I have also directly run the repo in local, and found the Filtering on DateTime does not work either.
To Reproduce
to create a simple page can reproduce
Expected behavior
filtering on DateTime column can work
The text was updated successfully, but these errors were encountered: