Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

$Date.Nice


Reply

2 Posts   2027 Views

Avatar
vetoo

3 May 2007 at 7:56am Community Member, 2 Posts

Hi all,
I have added the article pages & holder, for some reason I have no dates on my holder or article pages, if I remove the .Nice from $Date.Nice I get a date, but its not very nice...

any ideas why $Date.Nice is not working?

Avatar
Sean

3 May 2007 at 10:13am (Last edited: 3 May 2007 10:14am), Forum Moderator, 921 Posts

Have you set the Date using a Date field for the $db array? And using the DateField object for your date?

eg.

static $db = array(
'Date' => 'Date'
);

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new DateField('Date', 'Date'), 'Content');
}