You are here

function date_restrictions_date_popup_process_alter in Date Restrictions 7

Implements hook_date_popup_process_alter().

  • Adds our own validation callback.
  • Adds javascript settings to control the available days in the datepicker.

File

./date_restrictions.module, line 156

Code

function date_restrictions_date_popup_process_alter(&$element, $form_state, $context) {
  if (empty($element['#restrictions'])) {
    return;
  }
  $element['#element_validate'][] = 'date_restrictions_element_validate';
}