-
-
Save veganista/4065222 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* If this doenst work then try the below | |
*/ | |
echo $this->Form->input('Applicant.date_of_birth', array( | |
'type' => 'date', | |
'dateFormat' => 'DMY', | |
'minYear' => date('Y') - 110, | |
'maxYear' => date('Y')- 18, | |
) | |
); | |
/* This is least prefferred */ | |
echo $this->Form->input('Applicant.date_of_birth', array( | |
'type' => 'date', | |
'dateFormat' => 'DMY', | |
'minYear' => date('Y') - 110, | |
'maxYear' => date('Y')- 18, | |
'selected' => $applicationData['Applicant']['date_of_birth'], | |
) | |
); | |
/* this is even worse, but may work*/ | |
echo $this->Form->input('Applicant.date_of_birth', array( | |
'type' => 'date', | |
'dateFormat' => 'DMY', | |
'minYear' => date('Y') - 110, | |
'maxYear' => date('Y')- 18, | |
'selected' => strtotime($applicationData['Applicant']['date_of_birth']), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment