As previously announced via banners and our newsletters, support is no longer available through this platform.
For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.
You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.
Paid customers: Please log in to your store account for support.
Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com
Hi,
is there any way I can dynamically limit the values that are accepted in a date field?
For example, not allow any values in the future, or not allow values that are more than 10 days back from today, etc.
Thank you
Hi Johannes,
Thank you for your purchase.
Unfortunately something like this is not possible with the plugin build in features at the moment and it require some code customization. We can offer you our paid customization service where you can hire one of our developers to implement this feature for you.
If you are interested please give us detailed instructions and we can send you quote for this service.
Best regards.
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
Thanks, but this is not an option for us at the moment.
I've found a solution using MySQL triggers.
For anyone looking for something like this, here's the code:
Say you have a table 'table' in database 'db1' with a column 'date'.
DROP TRIGGER IF EXISTS chk_date_upd; delimiter // use db1 // create trigger chk_date_upd before update on db1.table for each row begin -- add 2000 years if the date is added like this: 10/11/17 if YEAR(new.date) < 100 then SET new.date= DATE_ADD(new.date, INTERVAL 2000 YEAR); end if; -- refuse date which is too far in the past if new.date<= DATE_ADD(CURDATE(), INTERVAL -6 MONTH) then SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Date value cannot be more than six months in the past'; end if; -- refuse date which is too far in the future if new.date>= DATE_ADD(CURDATE(), INTERVAL 2 MONTH) then SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Date value cannot be more than two months in the future'; end if; end; // delimiter ;Add another trigger on insert:
The triggers will be called before insert/update and adjusts the date or refuse it and display the custom error message to the user.
Ticket can be closed.