Closed gerasim closed 14 years ago
Hello!
I suggest change the file views/jelly/field/timestamp.php from
echo Form::input($name, date($pretty_format, $value), $attributes + array('id' => 'field-'.$name));
to
echo Form::input($name, (!isset($default) && !isset($value))?'':date($pretty_format, $value), $attributes + array('id' => 'field-'.$name));
elsewise I get a date (1970-01-01) in a form's field even if a default value declared explicitly as null (also parameter 'null'=>true), e.g.
'myField' => new Field_Timestamp(array( 'format' => 'Y-m-d', 'pretty_format' => 'Y-m-d', 'null' => true, 'default' => null, )),
Closed by 4d9fe90334749e536239ab8dd9d3ea3a1193f151. Thanks gerasim!
Hello!
I suggest change the file views/jelly/field/timestamp.php from
to
elsewise I get a date (1970-01-01) in a form's field even if a default value declared explicitly as null (also parameter 'null'=>true), e.g.