1 system.admin.inc system_date_time_lookup($form, &$form_state)

Ajax callback; Returns the date for a given format string.

File

core/modules/system/system.admin.inc, line 2872
Admin page callbacks for the System module.

Code

function system_date_time_lookup($form, &$form_state) {
  // Replace the preview based on the textfield's wrapper ID.
  $element = $form_state['triggering_element'];
  $parent_id = $element['#wrapper_attributes']['id'];
  $commands[] = ajax_command_html("#$parent_id .field-suffix", '<span>' . $element['#field_suffix'] . '</span>');
  return array('#type' => 'ajax', '#commands' => $commands);
}