• Resolved tundt

    (@tundt)


    Hello,
    I hope I can be helped here.
    I created a table with the WordPress plugin TablePress, which shows the training dates.
    The table therefore contains the columns for date, location and course content.
    This also works wonderfully with table press.
    But now the view of the table is to be changed so that appointments that are before the current date are no longer displayed.
    But I have not yet succeeded in this setting.
    Here in the forum I found a post that described a similar problem.
    I tried to find a solution based on this article. Whereby the following appeal came out:
    [table id = 1 responsive = scroll filter_date = “today” filter_date_colums = “1” cache_table_outout = false /]
    Unfortunately, it doesn’t seem to work.
    Maybe it’s the date formatting of the entries in the date column?
    I would be very grateful for any help.
    But normal filters work, e.g.
    [table id = 1 responsive = scroll filter = “14/09/2020” filter_columns = “1” cache_table_output = false /] shows the desired result.

    Best regards
    Heiko Witt

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For this, you will need the TablePress Extension from https://tablepress.org/downloads/extensions/tablepress-row-filter-date.zip
    Also, there’s a typo in your Shortcode parameter: filter_date_colums instead of filter_date_columns.
    And finally, you’ll indeed need to use the mm/dd/yyyy date format here, i.e. you’ll need multiple date columns, one for the filtering and one for displaying the column with your desired date format.

    Regards,
    Tobias

    Thread Starter tundt

    (@tundt)

    Hello,

    many thanks for the answer.
    I installed the TablePress Extension from your link, fixed the typo, and changed the date entries in the date column to the format dd/mm/yyyy.
    Now the table contents of my test table look like this:

    link to screenshot

    And as the shortcode on the page is this:

    [table id=1 responsive=scroll filter_date=”today” filter_date_columns=”1″ cache_table_output=false /]

    Unfortunately, it doesn’t work that well yet.
    Now, when the table is displayed on the page, no function is displayed, neither the color in the table header, nor the standard filter and search functions.
    Actually it should look like this:

    link to screenshot

    Now, unfortunately, it only looks like this: (Link to the picture)

    link to screenshot

    What am I doing wrong?

    Best regards
    Heiko

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    my guess here is that this is simply caused by the fact that there’s entry in the table for “today” (09/21/2020).

    This results in an empty table, due to which the JS features are not loaded.

    Regards,
    Tobias

    Thread Starter tundt

    (@tundt)

    Hello,

    Thanks for the hint. It works now.
    I changed the shortcode as follows and now it shows all appointments from the current date:

    [table id=1 responsive=collapse filter_date=”>today” filter_date_columns=”1″ /]

    The first date column is filtered, in which the date is formatted as mm / dd / yyyy. However, this column is hidden in both displays. That works great.

    But I have one more question:
    Is there a way to change the size of the input fields for the search or how many lines should be displayed? These input fields are a bit big, especially for the display on mobile phones they are a bit too big.
    I have marked the fields that I mean in the screenshot with a red frame.

    link to screenshot

    Regards,
    Heiko

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    >today is actually not a valid value here ?? You can only choose between past, today, and future.

    To influence those fields, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .dataTables_wrapper label input,
    .dataTables_wrapper label select {
        margin: 10px 4px !important;
        padding: 2px 4px !important;
        min-height: 28px !important;
    }

    Regards,
    Tobias

    Hi, are there shortcodes to show only the last 30 of information?

    Thank you

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    that’s tricky. The only idea I have here would be to use the hide_rows and show_rows Shortcode parameters. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Only show entries from the current date’ is closed to new replies.