You are here

function theme_datelist in Date 8

Returns HTML for a date selection form element.

Parameters

$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes.
1 theme call to theme_datelist()
_date_api_element_info in date_api/date_api_elements.inc
Implements hook_element_info().

File

date_api/date_api.module, line 294
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

Code

function theme_datelist($variables) {
  $element = $variables['element'];
  $attributes = array();
  if (isset($element['#id'])) {
    $attributes['id'] = $element['#id'];
  }
  if (!empty($element['#attributes']['class'])) {
    $attributes['class'] = (array) $element['#attributes']['class'];
  }
  $attributes['class'][] = 'container-inline';
  return '<div' . new Attribute($attributes) . '>' . drupal_render_children($element) . '</div>';
}