You are here

function theme_date_popup in Date 7

Same name and namespace in other branches
  1. 5.2 date_popup/date_popup.module \theme_date_popup()
  2. 6.2 date_popup/date_popup.module \theme_date_popup()
  3. 6 date_popup/date_popup.module \theme_date_popup()
  4. 7.3 date_popup/date_popup.module \theme_date_popup()
  5. 7.2 date_popup/date_popup.module \theme_date_popup()

Format a date popup element.

Use a class that will float date and time next to each other.

File

date_popup/date_popup.module, line 542
A module to enable jquery calendar and time entry popups. Requires the Date API.

Code

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

  // 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>';
}