Created
September 12, 2012 09:06
-
-
Save bakura10/3705417 to your computer and use it in GitHub Desktop.
DateSelect element for ZF 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->add(array( | |
'type' => 'Zend\Form\Element\DateSelect', | |
'name' => 'birthDate', | |
'options' => array( | |
'label' => 'Date de naissance', | |
'create_empty_option' => true, | |
'min_year' => date('Y') - 30, | |
'max_year' => date('Y') - 18, | |
'day_attributes' => array( | |
'data-placeholder' => 'Jour', | |
'style' => 'width: 20%' | |
), | |
'month_attributes' => array( | |
'data-placeholder' => 'Mois', | |
'style' => 'width: 20%' | |
), | |
'year_attributes' => array( | |
'data-placeholder' => 'Année', | |
'style' => 'width: 20%' | |
) | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment