JqueryDataTablesServerSide icon indicating copy to clipboard operation
JqueryDataTablesServerSide copied to clipboard

[QUESTION] DateTime Searching problem

Open vukasinpetrovic opened this issue 3 years ago • 2 comments

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; }
    }

image image

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; }
    }

image

image image

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

vukasinpetrovic avatar Jun 09 '21 21:06 vukasinpetrovic

@fingers10 Can you help me with this?

vukasinpetrovic avatar Jun 16 '21 10:06 vukasinpetrovic

@fingers10 Any info on this?

vukasinpetrovic avatar Jul 03 '21 12:07 vukasinpetrovic