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).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | date-419402-1.patch | 720 bytes | pathfinderelite |
Comments
Comment #1
pathfinderelite commentedHere's a needless patch
Comment #2
Edlund commentedReported fixed in #423144: Validate fails on text input, so marking this duplicate.