joomla/joomla-cms — pull request #2531 by Bakual (2013-11-16 18:57:18+00:00)
Title: Fix calendar formfield

The calendar formfield has two issues:
- The value is always shown in the format `2013-11-16 00:00:00` even if the `format` parameter would ask to only show the date. This is actually a bug in `JHtml::calendar()`.
- The formfield ignores `readonly` and `disabled` attributes.

The first issue can be tested by editing a form definition file like `/administrator/components/com_content/models/forms/article.xml` and change he `format` value for the `created` field (or any other calendar type). Note that the shown value doesn't respect the format, but if you select a date it will respect it. Apply change and it will also affect the value shown.

The second issue can be tested by looking at the `modified` field in the form. It should be `readonly` but the shows the calendar select button and allows to change the value of the field using this button. This PR will properly set the attributes in the formfield so `JHtml::calendar()` doesn't show the button anymore.

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32730