JqueryDataTablesServerSide
JqueryDataTablesServerSide copied to clipboard
[QUESTION] DateTime Searching problem
Describe the question I implemented SearchableDateTime field on many tables, but it works only on one and I cannot figure out why. In those on which it does not work, sorting works but searching does not in a way that whatever I type in searchbox no results match.
This is a model that works:
public class ApplicationUserDTO
{
[Sortable]
[SearchableString]
public string Id { get; set; }
[Sortable]
[SearchableString]
public string UserName { get; set; }
[Sortable]
[SearchableString]
public string Email { get; set; }
[Sortable(EntityProperty = "Profile.Location.Address")]
[SearchableString(EntityProperty = "Profile.Location.Address")]
public string Location { get; set; }
[Sortable(EntityProperty = "Profile.Gender")]
[SearchableEnum(typeof(Gender), EntityProperty = "Profile.Gender")]
public string Gender { get; set; }
[Sortable(EntityProperty = "Profile.DateOfBirth")]
[SearchableDateTime(EntityProperty = "Profile.DateOfBirth")]
public DateTime? DateOfBirth { get; set; }
public bool Active { get; set; }
}
This is a model that does not work:
public class PostReportDTO
{
[Sortable]
[SearchableLong]
public long Id { get; set; }
[Sortable]
[SearchableDateTime]
public DateTime DateTime { get; set; }
[Sortable(EntityProperty = "ReportedBy.UserName")]
[SearchableString(EntityProperty = "ReportedBy.UserName")]
public string ReportedBy { get; set; }
public PostDTO Post { get; set; }
[Sortable]
[SearchableString]
public string Explanation { get; set; }
public bool Resolved { get; set; }
}
Desktop (please complete the following information): OS: [e.g. iOS] MacOS Big Sur Browser [e.g. chrome, safari] Chrome Version [e.g. 22] 91 .NET Core 3.1
@fingers10 Can you help me with this?
@fingers10 Any info on this?