You are here

function date_input_format in Date 6

Same name and namespace in other branches
  1. 8 date_elements.inc \date_input_format()
  2. 5.2 date/date_elements.inc \date_input_format()
  3. 6.2 date/date_elements.inc \date_input_format()
  4. 7.3 date_elements.inc \date_input_format()
  5. 7 date_elements.inc \date_input_format()
  6. 7.2 date_elements.inc \date_input_format()

Determine the input format for this element.

1 call to date_input_format()
date_combo_process in date/date_elements.inc
Process an individual date element.

File

date/date_elements.inc, line 430
Date forms and form themes and validation.

Code

function date_input_format($element, $field) {
  if (!empty($field['widget']['input_format_custom'])) {
    return $field['widget']['input_format_custom'];
  }
  elseif (!empty($field['widget']['input_format']) && $field['widget']['input_format'] != 'site-wide') {
    return $field['widget']['input_format'];
  }
  return variable_get('date_format_short', 'm/d/Y - H:i');
}