You are here

function date_input_date in Date 7.3

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

Wrapper function around each of the widget types for creating a date object.

1 call to date_input_date()
date_combo_validate in ./date_elements.inc
Validate and update a combo element.

File

./date.module, line 45

Code

function date_input_date($field, $instance, $element, $input) {

  // Trim extra spacing off user input of text fields.
  if (isset($input['date'])) {
    $input['date'] = trim($input['date']);
  }
  switch ($instance['widget']['type']) {
    case 'date_text':
      $function = 'date_text_input_date';
      break;
    case 'date_popup':
      $function = 'date_popup_input_date';
      break;
    default:
      $function = 'date_select_input_date';
  }
  return $function($element, $input);
}