I use the following for a UK date format... hope it helps...
class MyObj extends DataObject() {
...
static $db = array('MyObjDate' => Date)
...
function getCMSFields() {
$fields = parent::getCMSFields();
...
$df = new DateField('MyObjDate',$strLabel);
$df->setConfig('showcalendar', true);
$df->setLocale('en_GB');
$df->setConfig('dateformat', 'dd/MM/yyyy');
$fields->replaceField('MyObjDate',$df);
...
return $fields;
}
Posted to: Problems with the field Date | Show Thread | Post Reply