#states do not work with 'datetime' form elements.
Update logic in the Datetime element to handle the nested elements.
Fix test fails.
User interface changes
None, other than #states working.
Data model changes
While trying to create a custom field widget containing a "datetime" form element, I discovered that the #states attribute does not work on it.
Some states can be achieved with a workaround: put the datetime element in a container, and put the #states on the container. But this is obviously no clean fix, and it doesn't work for all states. (Works for "visible" for example, but not for "required".)
I was not able to figure out why this is not working, but I noticed that there have been a lot of issues regarding the #states attribute in the issue tracker. Most of them for were for specific elements like submit buttons, select elements with multiple values, ...
|#55||datetime-element-states-2419131-55.patch||13.55 KB||Jo Fitzgerald|
|#2||Screen Shot 2015-02-03 at 17.30.11.png||9.43 KB||bertramakers|
|#1||Sandbox form Site-Install 2015-02-03 17-11-12.png||11.81 KB||lucastockmann|