The date is set no matter how old the date is.
The date field is cleared.
Clean installation of Joomla 3.7.3
It might have something to do with a default value for the minyear argument. Anyway, you should be able to select older dates. Why are there even a limit to this? Also, why is the minyear only relative and no option to set fixed.
Status | New | ⇒ | Confirmed |
I am not sure we can set dates older than 1900 in a gregorian calendar (because of UNix limits).
I thought we were limited to 1970 due to unix oimitations. We are validating the dates here so it wouldn't be possible. Alternatively if you needed it in a custom field you could write a custom field to handle it without specific calendar validation. And instead Store as a string.
@tonypartridge no it will go back to 1900 - just take a look ;)
JoomlaCalLocale.minYear = JoomlaCalLocale.minYear ? JoomlaCalLocale.minYear : 1900;
JoomlaCalLocale.maxYear = JoomlaCalLocale.maxYear ? JoomlaCalLocale.maxYear : 2100;
https://github.com/joomla/joomla-cms/blob/staging/media/system/js/fields/calendar.js#L75
so its expected Behaviour?
@brianteeman I thought that we covered that in the layout: https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/form/field/calendar.php#L128-L129
So with an override you could have user defined values for minimum and maximum year!
PS. If it's multilingual, with mixed calendars (e.g. jalali + gregorian) the override might need to pass the right values depending on the language.
limitation comes from use of strtotime()
functions in the calendar.
you can save any date in MySQL but it can be broken by strtotime()
see notes http://php.net/strtotime
php DateTime has no such limits
also true
Not sure if there is a bug here, as we have
strtotime()
and 32bit versions of PHPStatus | Confirmed | ⇒ | Discussion |
Labels |
Added:
J3 Issue
|
OK to close?
closing - issue can always reopened if needed.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-21 03:41:08 |
Closed_By | ⇒ | franz-wohlkoenig |
Issue confirmed. Test com_fields in Article.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17189.