Hi!
This is independent form the used extension. In order to reproduce:
- Install T4 Framework for Joomla 3 v.2.0.6 and for example t4_bs5_blank template
- Open the file templates/t4_bs5_blank/index.php, add the line of code below
echo JHtml::_('calendar', '', 'event_date', 'event_date', '%Y-%m-%d');
The date picker will be displayed. Select a date, you expect it to be displayed in Y-m-d format, without time. But time is included, so it is wrong.
The issue only happens in Joomla 3. In Joomla 3, the key for date format is data-dayformat (for reference https://github.com/joomla/joomla-cms/blob/3.10-dev/layouts/joomla/form/field/calendar.php#L118), but you are using data-date-format which only works for Joomla 4.
In short, you need to fix the bug in the file plugins/system/t4/themes/base/html/layouts/joomla/form/field/calendar.php, use version_compare to check:
- If Joomla 4, use data-date-format
- If Joomla 3, use data-dayformat
I.e. for Joomla 3 row 106 in v. 2.0.6 should be
'data-dayformat' => $format,
and not
'data-date-format' => $format,
I hope the problem is clear now.
Thanks a lot!
Kind regards,
Frank