I am building a custom report in the CMS and cannot get a date picker calendar to appear. The code I am using to insert this on the report is:
$DateField = new Datefield('StartDate','Start Date'); $DateField->setConfig('showcalendar', true); $DateField->setConfig('dateformat', 'YYYY-MM-dd'); $params->push($DateField);
I then reference the $params field as follows:
$Records = DataObject::get("Member", "Created between '" . $params['StartDate'] ."' and '" . $params['EndDate'] ."'", "Created DESC", Null);
The field is inserted into the report but just as a text field.
I can get the date picker working using this code if I add the code to a content page and add the field to a tab but not on the Reports page.
Any help with this would be much appreciated.
P.S. this is my first post and I am loving SilverStripe...