Skip Navigation

[Resolved] Select a date before 1583

This thread is resolved. Here is a description of the problem and solution.

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 support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

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 Christian Cox 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#610398

Tell us what you are trying to do?

I am setting up a history blog and need dates before 1583. Is there any way to set it up that way?

I only found one post about this from last year and it seemed like it is not possible.

#610486

Hi, 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:
https://toolset.com/errata/toolset-datepicker-date-limitations/

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. Here's an epoch timestamp converter, where you can input any date and retrieve an epoch timestamp:
https://www.epochconverter.com/
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.
https://codex.wordpress.org/Shortcode_API
http://php.net/manual/en/function.date.php
http://php.net/manual/en/function.strftime.php

#628763

Hello,

I've got the same problem. But i cant see the links, it gets hidden link on parts of your answer,

How this is solved?

#628826

Try now, I have edited the links to be public.