Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2012 10:28
Show Gist options
  • Save anonymous/4065071 to your computer and use it in GitHub Desktop.
Save anonymous/4065071 to your computer and use it in GitHub Desktop.
$dob = explode('-', $applicationData['Applicant']['date_of_birth']);
$dobDayArray = explode(' ', $dob[2]);
$dobDay = $dobDayArray[0];
$dobMonth = $dob[1];
$dobYear = $dob[0];
echo $this->Form->input('Applicant.date_of_birth', array(
'type' => 'date',
'dateFormat' => 'DMY',
'minYear' => date('Y') - 110,
'maxYear' => date('Y')- 18,
'selected' => array(
'day' => $dobDay,
'month' => $dobMonth,
'year' => $dobYear
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment