You are here

function theme_date_popup in Date 5.2

Same name and namespace in other branches
  1. 6.2 date_popup/date_popup.module \theme_date_popup()
  2. 6 date_popup/date_popup.module \theme_date_popup()
  3. 7.3 date_popup/date_popup.module \theme_date_popup()
  4. 7 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 479
A module to enable jquery calendar and time entry popups. Requires the Date API.

Code

function theme_date_popup($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';
  }
  $element['#attributes']['class'] .= $class;
  if (isset($element['#children'])) {
    $output = $element['#children'];
  }
  return '<div ' . drupal_attributes($element['#attributes']) . '>' . theme('form_element', $element, $output) . '</div>';
}