See the attached screenshot of a node form. It shows 4 fields:
- 1 single text field
- 1 single date field
- 1 multiple text field
- 1 multiple date field

See how date field does not conform to the standard way fields should render:
- a single date field is rendered without any label and inside a fieldset.
- a multiple date field has a label but each item is rendered as a fieldset. Help text is displayed both in each item and at the bottom of the field.

This way, it is impossible to alter or theme date fields like any other field.

CommentFileSizeAuthor
date-fields-node-form.png66.19 KBanrikun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

Status: Active » Closed (works as designed)

This is not a bug. You are comparing a simple text field to an over-simplified example of a date field. Date fields are not simple fields. They are collections of field elements that can include an all day checkbox, an end date checkbox, a date field, a time field, a year field, a month field, a day field, an hour field, a minute field, a time field, and am/pm field, and a timezone field. You can't display all those elements easily or safely across themes without fieldsets.

I would say that practically no one, if anyone, is using a simple text date field with nothing else included.

KarenS’s picture

Also, all these sub-elements are floated, to keep the form from being 5 miles long. And the fieldset keeps the floated elements contained.

anrikun’s picture

Assigned: Unassigned » anrikun
Status: Closed (works as designed) » Active

Instead of closing this, why don't you let people give their opinions about this?
At least give me a chance to submit a patch.
Or if contributions are not allowed here, tell me.

By the way, I understand that a date field may contain many sub-fields, but that does not prevent it from respecting the way a field has to be, that is, having a label and a required mark if necessary.
This is not the case here.
And descriptions should not be displayed several times.
So there is a bug.
As I said, I will submit a patch.

KarenS’s picture

Status: Active » Closed (works as designed)

There is already a discussion about this at #1467712: Make it possible to disable fieldset for date field. We don't need two issues. I don't consider it a bug but I am willing to consider a feature request, which I already said on the other issue.

KarenS’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)

And there are already other issues about things like 'required'. Please look for duplicate issues and remove them from this one. I don't know if there is anything left here that is a bug not already reported. I was marking this 'works as designed' for the fieldset, which seemed to be the primary thing mentioned in the issue.

arlinsandbulte’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I agree with Karen, this is a duplicate of the other issue.
Also, you have only shown effects for 4 different field configurations in your screenshot. In reality, there are MANY more that need to be considered. See the other issue for more...