Hello,
Is it possible to add a Calendar Date Picker to a Popup CMS window?
I have a basic Calendar Page :
<?php
class CalendarPage extends Page {
static $db = array(
'EventDate' => 'Date',
'EventTime' => 'Time',
'EventTitle' => 'Text',
'EventDescription' => 'HTMLText',
'EventContact' => 'Text',
'ContactEmailAdd' => 'Text'
);
static $has_many = array(
'EventCalendarDate' => 'CalendarDate',
);
function getCMSFields() {
$fields = parent::getCMSFields();
$tablefield = new ComplexTableField(
$this,
'EventCalendarDate',
'CalendarDate',
array(
'EventDate' => 'Event Date',
'EventTime' => 'Event Time',
'EventTitle' => 'Title',
'EventDescription' => 'Description',
'EventContact' => 'Contact Name',
'ContactEmailAdd' => 'Contact Email'
),
'getCMSFields_forPopup'
);
}
class CalendarPage_Controller extends Page_Controller{
}
And I want to add in a Date Picker as per tutorial 2:
$fields->addFieldToTab('Root.Content.Main', $dateField = new DateField('Date','Article Date (for example: 20/12/2010)'), 'Content');
$dateField->setConfig('showcalendar', true);
$dateField->setConfig('dateformat', 'dd/MM/YYYY');
But I can't figure out or find any topics on this? Is it possible?
Thanks
Marc