You are here

function date_timezone_element_value_callback in Date 8

Same name and namespace in other branches
  1. 7.3 date_api/date_api_elements.inc \date_timezone_element_value_callback()
  2. 7 date_api/date_api_elements.inc \date_timezone_element_value_callback()
  3. 7.2 date_api/date_api_elements.inc \date_timezone_element_value_callback()

Element value callback for date_timezone element.

1 string reference to 'date_timezone_element_value_callback'
_date_api_element_info in date_api/date_api_elements.inc
Implements hook_element_info().

File

date_api/date_api_elements.inc, line 174
Date API elements themes and validation. This file is only included during the edit process to reduce memory usage.

Code

function date_timezone_element_value_callback($element, $input = FALSE, &$form_state = array()) {
  $return = '';
  if ($input !== FALSE) {
    $return = $input;
  }
  elseif (!empty($element['#default_value'])) {
    $return = array(
      'timezone' => $element['#default_value'],
    );
  }
  return $return;
}