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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Adding Dropdown Calendar to Popup


2 Posts   1212 Views


30 May 2011 at 10:30pm Community Member, 65 Posts


Is it possible to add a Calendar Date Picker to a Popup CMS window?

I have a basic Calendar Page :

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(
          'EventDate' => 'Event Date',
          'EventTime' => 'Event Time',
          'EventTitle' => 'Title',
          'EventDescription' => 'Description',
          'EventContact' => 'Contact Name',
          'ContactEmailAdd' => 'Contact Email'



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?



BLU42 Media

1 June 2011 at 7:06am Community Member, 71 Posts

Hey Marc-

I used UncleCheese's DatePickerField - you can find it in the [url=]DataObjectManager module[/url]. Works great in the popup!