Skip to content

Instantly share code, notes, and snippets.

/*
* 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,
)
);
$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',
@veganista
veganista / destroy-sample-data.php
Created May 10, 2012 14:17 — forked from mgirouard/destroy-sample-data.php
A quick hack to destroy all sample data in an OpenCart catalog.
<?php
$options = getopt('p:');
$prefix = empty($options['p'])
? realpath('.')
: realpath($options['p']);
if (empty($prefix)) {
die("Bad prefix. Try again.\n");
}