This code produces an error
JHTML::calendar(
'12-30-2015',
'something',
'something',
'%m-%d-%Y'
);
This happens only with the date format %m-%d-%Y.
If you change the date format (e.g. %Y-%m-%d) and supply a date relative to that, works fine.
After some debugging i found out:
1. No matter what date is supplied the value becomes 01-01-1970
2. The error is generated by a code in the title of the text input
title="' . ($inputvalue ? static::_('date', $value, null, null) : '')
file: libraries/cms/html/html.php
function: calendar
joomla version: 3.4.5
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-12-09 19:38:19 |
| Closed_By | ⇒ | Bakual |
Thanks!
| Labels |
Added:
?
|
||
The
$valueneeds to be always in english format (2015-12-30).The
$formatmay be a different non-english format. It specifies how the date will be displayed.Closing as working as intended.