There is a slight coding mistake in the date_text_input_value() function found in date_api_elements.inc. The function never defines a $date variable, but uses one here (line 529):

$value = date_convert_from_custom($input, $element['#date_format']);
$value = date_limit_value($date, $granularity);

Notice the date_limit_value() function passes in the $date variable, but the variable is never set. I believe the line above it should be:

$date = date_convert_from_custom($input, $element['#date_format']);

Assigning the value to $date rather than $value fixes the issue (I was receiving validation errors on my CCK date field before doing this).

CommentFileSizeAuthor
#1 date-419402-1.patch720 bytespathfinderelite

Comments

pathfinderelite’s picture

Status: Active » Needs review
StatusFileSize
new720 bytes

Here's a needless patch

Edlund’s picture

Status: Needs review » Closed (duplicate)

Reported fixed in #423144: Validate fails on text input, so marking this duplicate.