1 date.elements.inc | date_input_format($element, $field, $instance) |
Determine the input format for this element.
File
- core/
modules/ date/ date.elements.inc, line 1777 - Date forms and form themes and validation.
Code
function date_input_format($element, $field, $instance) {
if (!empty($instance['widget']['settings']['input_format_custom'])) {
return $instance['widget']['settings']['input_format_custom'];
}
elseif (!empty($instance['widget']['settings']['input_format']) && $instance['widget']['settings']['input_format'] != 'site-wide') {
return $instance['widget']['settings']['input_format'];
}
$shortformat = system_date_format_load('short');
return $shortformat['pattern'];
}