You are here

function theme_date_text in Date 7

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

Format a date text 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.

File

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

Code

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