1 date.api.php | hook_date_text_process_alter(&$element, &$form_state, $context) |
Alter the date_text widget element.
Parameters
array $element: An associative array containing the properties of the date_text element.
array $form_state: A keyed array containing the current state of the form.
array $context: An associative array containing the following keys:
- form: Nested array of form elements that comprise the form.
See also
File
- core/
modules/ date/ date.api.php, line 249 - Hooks provided by the Date module.
Code
function hook_date_text_process_alter(&$element, &$form_state, $context) {
$all_day_id = !empty($element['#date_all_day_id']) ? $element['#date_all_day_id'] : '';
if ($all_day_id != '') {
// All Day handling on text dates works only if the user leaves the time out
// of the input value. There is no element to hide or show.
}
}