5514 Posts in 1733 Topics by 1219 members
|Go to End|
22 May 2012 at 5:24pm Last edited: 22 May 2012 5:26pm
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');
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...
12 October 2012 at 12:02am
I was just wondering if you solved this? The following quote from this post is the best I've found but I'm still a little unclear on how to do this.
Note that the jquery popup date picker field won't work in the report admin area if you want to use it. I had to create a custom extension which would include the JS requirements, as well as a little but of custom CSS to make it look OK. However, if you're happy with a text field for date input you'll have no problems.
|Go to Top|