21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 789 Views |
-
Adding Dropdown Calendar to Popup

30 May 2011 at 10:30pm
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
-
Re: Adding Dropdown Calendar to Popup

1 June 2011 at 7:06am
Hey Marc-
I used UncleCheese's DatePickerField - you can find it in the DataObjectManager module. Works great in the popup!
-John
| 789 Views | ||
|
Page:
1
|
Go to Top |

