You are here

function theme_date_select in Date 5.2

Same name and namespace in other branches
  1. 8 date_api/theme/theme.inc \theme_date_select()
  2. 6.2 theme/theme.inc \theme_date_select()
  3. 6 date_api_elements.inc \theme_date_select()
  4. 7.3 date_api/theme/theme.inc \theme_date_select()
  5. 7 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_widget_settings_form in date/date_admin.inc

File

./date_api_elements.inc, line 684
Date API elements themes and validation. This file is only included during the edit process to reduce memory usage.

Code

function theme_date_select($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>';
}