Okay
  Public Ticket #3688959
Allow date filtering on Datetime column
Open

Comments

  •  1
    Uriahs started the conversation

    Right now if a column is defined in MySQL as datetime, you can set the filtering as just Date range, but WPDT returns no results...

    The only solution seems to be to make the filtering also "Datetime range"...but thats just yet another step if you know you want to filter all entries for a particular day (From 12:00 AM - 11:59 PM)

    I noticed that when you set a date, it automatically sets the time to the current time...i think it would probably make more sense if it defaulted to 12:00 AM (00:00) of that date selected

  •  1,767
    Miloš replied

    Hi Uriahs,

    Yes, at the moment there could be issues for a scenario like that.

    As we pointed out in the Date column Documentation;

    • Issues to note:
      • When working with Excel files, it’s the best to set the format of the Date columns as plain text; since the PHPSpreadsheet library that parses Excel files does not parse the Excel date format correctly, which results in an incorrect rendering of the dates (usually they get reset to 01/01/1970).
      • When you’re working with MySQL, please cast timestamps, and datetime columns as dates only to avoid problems.
      • Global search doesn’t support search by date.


    At the moment, we can not improve this, but we will do our best to improve it in the future.

    I can't promise an ETA on it, though.


    2. You are right, at the moment that is the current logic - if we set a Date Picker as the Editor Type or filtering;

    by default, it first offers the current date and time.

    I will pass your suggestion to our management and developers, they will consider to change it as you requested, but i can't promise if it will be changed and an ETA.

    You could create a suggestion for other users to vote, though, so that can affect the decision.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables