If a datefield element is set with a #default_value = '2010-09-22 09:00:00' then when the element is processed, two subelements - date, time - is created each with a default value. Then when form.inc calls form_set_value for the parent datefield element and the two child elements, the form_state value is corrupted - it becomes '0010-09-22 09:00:00'

The patch processes prevents the processing of the date and time child elements. In order not to break rendering, I manually set the #name attribute of the child elements and set #input = FALSE.

CommentFileSizeAuthor
date-processing.patch2.64 KBdeveloper-x

Comments

developer-x’s picture

Status: Needs review » Fixed

I've been testing this fix and it appears solid - I've committed to cvs

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.