I have a table that has 5 columns including a from_date, to_date column, plus others. It basically shows the current year events. The display table can be sorted and searched, but after the from_date goes past the 25 default displayed, we have to progress through pagination to get to the current week.
I don't want to lose my previous events. Some folks want to see them, so I can't put a hard set WHERE clause to only grab >= current week.
Is there any way on the front side to have the pagination go to the current week page on load?
- I am sorry to disappoint you, but we don't have a built-in solution for this at the moment,
because in our dynamic placeholders we don't have one that could set a default filter for the current week.
If it was a different scenario, to set a default table filter to %CURRENT_DATE% , you could set a predefined filter on a date column,
and if you enable the "Clear filters" button in the table's Sorting and Filtering tab,
the users would first see only the rows for today on the table load, and if they clear the filter - then table goes back to the first page.
- If i understood the use-case correctly, you will be adding new Events while keeping the old events on first pages,
so it would not be a fixed page number to load the table on by default;
and you would need our plugin to dynamically change the default page loaded according to the current week?
If i understood correctly and that is the case,
we don't have any built-in solution to achieve this at this time, but you can suggest it to our developers - they will do their best to make a solution in the future.
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.
-
If you have coding skills and wish to try to make a custom solution now,
Technically we could use the filter and set %CURRENT_DATE%, but the field is a date field, and once we enable date range, it fails to allow the %CURRENT_DATE%. It forces us to set it as text to do so. While that works, that's clunky and makes the point of a date field useless.
Any reason the admin back end can't be allowed to accept %CURRENT_DATE% as a predefined value?
Here is an example I set manually from the front end by entering just today's date:
Yes, unfortunately, any of the dynamic placeholders, including the %CURRENT_DATE% ,
it is not possible to use them in a Date Range filter with the current plugin's capabilities.
They can only be used in a "Text" filter type, you are correct.
I should have mentioned that right away, that is a part of the reason why i said that we don't currently have a valid solution to load the current week for this kind of use-case.
Despite best efforts, i can't come up with a working idea how we might achieve this right now.
We will do our best to add a solution, though i can't promise an exact ETA.
You can make a suggestion for our developers on the page i sent earlier and they will do their best to work on adding a solution as soon as possible.
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.
I have a table that has 5 columns including a from_date, to_date column, plus others. It basically shows the current year events. The display table can be sorted and searched, but after the from_date goes past the 25 default displayed, we have to progress through pagination to get to the current week.
I don't want to lose my previous events. Some folks want to see them, so I can't put a hard set WHERE clause to only grab >= current week.
Is there any way on the front side to have the pagination go to the current week page on load?
Hi, Frank.
Thanks for reaching out to us.
- I am sorry to disappoint you, but we don't have a built-in solution for this at the moment,
because in our dynamic placeholders we don't have one that could set a default filter for the current week.
If it was a different scenario, to set a default table filter to %CURRENT_DATE% , you could set a predefined filter on a date column,
and if you enable the "Clear filters" button in the table's Sorting and Filtering tab,
the users would first see only the rows for today on the table load, and if they clear the filter - then table goes back to the first page.
- If i understood the use-case correctly, you will be adding new Events while keeping the old events on first pages,
so it would not be a fixed page number to load the table on by default;
and you would need our plugin to dynamically change the default page loaded according to the current week?
If i understood correctly and that is the case,
we don't have any built-in solution to achieve this at this time, but you can suggest it to our developers - they will do their best to make a solution in the future.
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.
-
If you have coding skills and wish to try to make a custom solution now,
you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.
Please be advised that custom solutions with hooks are not included in our support.
You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.
( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Miloš,
Thank you.
Technically we could use the filter and set %CURRENT_DATE%, but the field is a date field, and once we enable date range, it fails to allow the %CURRENT_DATE%. It forces us to set it as text to do so. While that works, that's clunky and makes the point of a date field useless.
Any reason the admin back end can't be allowed to accept %CURRENT_DATE% as a predefined value?
Here is an example I set manually from the front end by entering just today's date:
Hi, Frank.
Yes, unfortunately, any of the dynamic placeholders, including the %CURRENT_DATE% ,
it is not possible to use them in a Date Range filter with the current plugin's capabilities.
They can only be used in a "Text" filter type, you are correct.
I should have mentioned that right away, that is a part of the reason why i said that we don't currently have a valid solution to load the current week for this kind of use-case.
Despite best efforts, i can't come up with a working idea how we might achieve this right now.
We will do our best to add a solution, though i can't promise an exact ETA.
You can make a suggestion for our developers on the page i sent earlier and they will do their best to work on adding a solution as soon as possible.
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.
Sorry for the inconvenience.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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