You are here

function date_select_input_value in Date 6

Same name and namespace in other branches
  1. 5.2 date_api_elements.inc \date_select_input_value()
  2. 6.2 date_api_elements.inc \date_select_input_value()

Helper function for extracting a date value out of user input.

1 call to date_select_input_value()
date_select_validate in ./date_api_elements.inc
Validation function for date selector.

File

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

Code

function date_select_input_value($element) {
  if (date_is_valid($element['#value'], DATE_ARRAY)) {
    return date_convert($element['#value'], DATE_ARRAY, DATE_DATETIME);
  }
  return NULL;
}