You are here

function date_all_day_date_popup_pre_validate_alter in Date 8

Same name and namespace in other branches
  1. 7.3 date_all_day/date_all_day.module \date_all_day_date_popup_pre_validate_alter()
  2. 7.2 date_all_day/date_all_day.module \date_all_day_date_popup_pre_validate_alter()

Implements hook_date_select_pre_validate_alter().

This hook lets us alter the element or the form_state before the rest of the date_popup validation gets fired.

File

date_all_day/date_all_day.module, line 273
Adds All Day functionality to the Date field.

Code

function date_all_day_date_popup_pre_validate_alter(&$element, &$form_state, &$input) {

  // Let Date module massage the format for all day values so they will pass validation.
  // The All day flag, if used, actually exists on the parent element.
  date_all_day_value($element, $form_state);
}