Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm in TYPO3 v.6.2 and from this year the expiration date is no longer accepting dates beyond 2020-12-31.

That was some sort of prophecy? XD

enter image description here

I suppose it is just a matter of configuration.

Where can I change that to enable future expiration dates?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

That's the gentle reminder to upgrade your TYPO3 installation ;)

Your problem is that in old TYPO3 versions the upper limit of the date selector is hard coded in the TYPO3 core.

This can be fixed with a little bit of PHP code, e.g. in the ext_localconf.php or Configuration/TCA/Overrides/YOUR_TABLE_NAME.php of your own extension:

$GLOBALS['TCA']['YOUR_TABLE_NAME']['columns']['YOUR_FIELD_NAME']['config']['range']['upper'] =
    mktime(0,0,0,12, 31, 2030);

The code snippet must be adapted for every table and field that contains a date selector.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...