You are here

function date_widget_info in Date 6

Same name and namespace in other branches
  1. 5.2 date/date.module \date_widget_info()
  2. 5 date.module \date_widget_info()
  3. 6.2 date/date.module \date_widget_info()

Implementation of hook_widget_info().

File

date/date.module, line 66
Defines date/time field types for the Content Construction Kit (CCK).

Code

function date_widget_info() {
  $info = array(
    'date_select' => array(
      'label' => t('Select List'),
      'field types' => array(
        'date',
        'datestamp',
        'datetime',
      ),
      'multiple values' => CONTENT_HANDLE_MODULE,
      'callbacks' => array(
        'default value' => CONTENT_CALLBACK_CUSTOM,
      ),
    ),
    'date_text' => array(
      'label' => t('Text Field with custom input format'),
      'field types' => array(
        'date',
        'datestamp',
        'datetime',
      ),
      'multiple values' => CONTENT_HANDLE_MODULE,
      'callbacks' => array(
        'default value' => CONTENT_CALLBACK_CUSTOM,
      ),
    ),
  );
  if (module_exists('date_popup')) {
    $info['date_popup'] = array(
      'label' => t('Text Field with jquery pop-up calendar'),
      'field types' => array(
        'date',
        'datestamp',
        'datetime',
      ),
      'multiple values' => CONTENT_HANDLE_MODULE,
      'callbacks' => array(
        'default value' => CONTENT_CALLBACK_CUSTOM,
      ),
    );
  }
  return $info;
}