1 date.theme.inc theme_date_combo($variables)

Returns HTML for a start/end date combination on form.

Related topics

File

core/modules/date/date.theme.inc, line 392
Theme and preprocess functions for output by Date module.

Code

function theme_date_combo($variables) {
  $element = $variables['element'];

  // Group start/end items together in fieldset.
  $fieldset = array(
    '#title' => field_filter_xss(t($element['#title'])) . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
    '#value' => '',
    '#description' => !empty($element['#fieldset_description']) ? $element['#fieldset_description'] : '',
    '#attributes' => array('class' => array('date-combo')),
    '#children' => $element['#children'],
  );
  // Add marker to required date fields.
  if ($element['#required']) {
    $fieldset['#title'] .= " " . theme('form_required_marker');
  }
  return theme('fieldset', array('element' => $fieldset));
}