Setting a default vallue works only when I change the name of the
widget.
When the name is exactly the same with the field name in a database
table, it does not work.

$years = range(date('Y'), date('Y') + 3);
$this->setWidget('starting_at', new sfWidgetFormDateTime(array(
  'date' => array(
    'format' => '%year%年 %month%月 %day%日',
    'can_be_empty' => false,
    'years' => array_combine($years, $years)
  ),
  'format' => '%date% — %time%',
  'default' => date('Y/m/d H:i', time())
)));

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to