How do you set the date to sort by current date by default.
I know i can set filtering rule, and set a predefined date but i want that predefined date to be "Today's Date" or " Current Date".
It only allows me to pick a predefined date, and no option for Today's date. Is there a shortcode or something i can put there to set it to current date.
Unfortunately at the moment is not possible to set current day in filter predefined value.
You can achieve this with SQL query like this
SELECT *
FROM table_name
WHERE table_name.`name_of_column_that_contain_date` = CURDATE()
Like this will be shown only rows with current day.
If you not using queries, you can also filter the table with Conditional formatting for that column where is available %TODAY% placeholder. You have to set rules like this(attachment 1) where you will set two rules one that is less than %TODAY% and second that is greater than %TODAY% and set row class for example hide(like in example)
Then you have to make that class in Custom wpDataTables CSS under the "Custom JS AND CSS" in main settings of wpdatatables.(attachment 2)
How do you set the date to sort by current date by default.
I know i can set filtering rule, and set a predefined date but i want that predefined date to be "Today's Date" or " Current Date".
It only allows me to pick a predefined date, and no option for Today's date. Is there a shortcode or something i can put there to set it to current date.
Thanks
Hi Timothy,
Thank you for your purchase.
Unfortunately at the moment is not possible to set current day in filter predefined value.
You can achieve this with SQL query like this
Like this will be shown only rows with current day.
If you not using queries, you can also filter the table with Conditional formatting for that column where is available %TODAY% placeholder. You have to set rules like this(attachment 1) where you will set two rules one that is less than %TODAY% and second that is greater than %TODAY% and set row class for example hide(like in example)
Then you have to make that class in Custom wpDataTables CSS under the "Custom JS AND CSS" in main settings of wpdatatables.(attachment 2)
Like this will be shown data only for current date.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables