Re: date problem with dateElementFormat
| From: | Mads Lie Jensen | Date: | Sat, 08 Jan 2011 08:25:05 +0000 |
| Subject: | Re: date problem with dateElementFormat | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-30906@lists.php.net to get a copy of this message | ||
On Fri, 7 Jan 2011 22:23:44 -0800, worknit@gmail.com (Jon Savian) wrote:
>How about
>
>$fb = DB_DataObject_FormBuilder::create($do, array('minYear' =>
>'2000', 'maxYear' => '2020'));
>
>is this one possible? Somehow not working.
You could use the dateOptionsCallback:
Put this in your dataObject.
public function dateOptions($field, $fb) {
return array('minYear' => 2000, 'maxYear' => 2020);
}
See:
<http://pear.reversefold.com/dokuwiki/pear:db_dataobject_formbuilder:callback_methods>
--
Mads Lie Jensen - mads@gartneriet.dk - ICQ #25478403
Gartneriet - http://www.gartneriet.dk/