You are here

function theme_date_select in Date 7

Same name and namespace in other branches
  1. 8 date_api/theme/theme.inc \theme_date_select()
  2. 5.2 date_api_elements.inc \theme_date_select()
  3. 6.2 theme/theme.inc \theme_date_select()
  4. 6 date_api_elements.inc \theme_date_select()
  5. 7.3 date_api/theme/theme.inc \theme_date_select()
  6. 7.2 date_api/theme/theme.inc \theme_date_select()

Format a date selection element.

Parameters

$element: An associative array containing the properties of the element. Properties used: title, value, options, description, required and attributes.

Return value

A themed HTML string representing the date selection boxes.

1 theme call to theme_date_select()
_date_field_widget_settings_form in ./date_admin.inc

File

date_api/theme/theme.inc, line 30
Theme files for Date API.

Code

function theme_date_select($vars) {
  $element = $vars['element'];
  $output = '';
  $class = 'container-inline-date';

  // Add #date_float to allow date parts to float together on the same line.
  if (empty($element['#date_float'])) {
    $class .= ' date-clear-block';
  }
  if (isset($element['#children'])) {
    $output = $element['#children'];
  }
  return '<div class="' . $class . '">' . theme('form_element', $element, $output) . '</div>';
}