Returns HTML for an #date form element.
Supports HTML5 types of 'date', 'datetime', 'datetime-local', and 'time'. Falls back to a plain textfield. Used as a sub-element by the datetime element type.
array $variables: An associative array containing:
function theme_date($variables) {
$element = $variables['element'];
if (empty($element['attribute']['type'])) {
$element['attribute']['type'] = 'date';
}
element_set_attributes($element, array(
'id',
'name',
'type',
'min',
'max',
'step',
'value',
'size',
));
_form_set_attributes($element, array(
'form-' . $element['attribute']['type'],
));
return '<input' . new Attribute($element['#attributes']) . ' />';
}