Problem: I would like to use a datepicker to select a date before 1583.
Solution: It's not possible to use Toolset's datepickers to save dates outside of the date range 15/10/1582 to 31/12/3000, according to our developers.
I think one alternative approach here would be to use a Number field instead of a datepicker field. If you only need the Year, that's pretty straightforward. However if you need to save a full date (year, month, day), it will require more information. Toolset datepickers save epoch timestamps in the database, so you could use the same approach.
Date: 28/01/1582 0:00:00 GMT
Epoch timestamp: -12241756800
So to save the date Jan 01 1582, you would save -12241756800 in the custom field.
Then you could use a custom shortcode to format that custom field timestamp as a date using PHP.
Relevant Documentation:
https://www.epochconverter.com/
https://codex.wordpress.org/Shortcode_API
http://php.net/manual/en/function.date.php
http://php.net/manual/en/function.strftime.php
https://toolset.com/errata/toolset-datepicker-date-limitations/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Our next available supporter will start replying to tickets in about 1.87 hours from now. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 3 replies, has 3 voices.
Last updated by 6 years, 8 months ago.
Assisted by: Christian Cox.