Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
Figured it out via the jQuery DatePicker information.
This would be a great addition though: addBirthdate() to avoid the need to
manually set it all up. For anyone looking for it here is the code:
$form->addDate('Birthdate: ', 'birthdate', '', array(
"jqueryOptions" => array(
"dateFormat" => "yy-mm-dd",
'yearRange' => date('Y', strtotime('-100 year')) . ':' . date('Y', strtotime('3 year')),
'defaultDate' => date('Y-m-d', strtotime('-13 year')),
)));
Original comment by prem...@gmail.com
on 6 Dec 2010 at 7:00
Amendment:
'yearRange' => date('Y', strtotime('-100 year')) . ':' . date('Y',
strtotime('-3 year')),
Original comment by prem...@gmail.com
on 6 Dec 2010 at 7:01
Yep, you got it. The last example - "Date w/Modified Year Range:" - at
http://www.imavex.com/php-form-builder-class/examples/jquery.php#date demos
this functionality.
- Andrew
Original comment by ajporterfield@gmail.com
on 6 Dec 2010 at 7:06
Ah, thanks for that. I was just looking in the wrong area.
Original comment by prem...@gmail.com
on 6 Dec 2010 at 8:13
The current documentation section is definitely lacking, so I'm impressed that
you figured it out in the first place:) Best of luck in the rest of your
development.
- Andrew
Original comment by ajporterfield@gmail.com
on 6 Dec 2010 at 8:21
Original issue reported on code.google.com by
prem...@gmail.com
on 6 Dec 2010 at 6:43