1 date.module | date_input_date($field, $instance, $element, $input) |
Wrapper function around each of the widget types for creating a date object.
File
- core/
modules/ date/ date.module, line 25 - Defines date/time field types.
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);
}