You are here

function date_element_info in Date 7.2

Same name and namespace in other branches
  1. 8 date.module \date_element_info()
  2. 7.3 date.module \date_element_info()
  3. 7 date.module \date_element_info()

Implements hook_element_info().

Date_combo will create a 'start' and optional 'end' date, along with an optional 'timezone' column for date-specific timezones. Each 'start' and 'end' date will be constructed from date_select or date_text.

File

./date.module, line 164

Code

function date_element_info() {
  $type = array();
  $type['date_combo'] = array(
    '#input' => TRUE,
    '#delta' => 0,
    '#columns' => array(
      'value',
      'value2',
      'timezone',
      'offset',
      'offset2',
    ),
    '#process' => array(
      'date_combo_element_process',
    ),
    '#element_validate' => array(
      'date_combo_validate',
    ),
    '#theme_wrappers' => array(
      'date_combo',
    ),
    '#attached' => array(
      'css' => array(
        drupal_get_path('module', 'date_api') . '/date.css',
      ),
    ),
  );
  if (module_exists('ctools')) {
    $type['date_combo']['#pre_render'] = array(
      'ctools_dependent_pre_render',
    );
  }
  return $type;
}