7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » CalendarDateField doesn't work
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 2078 Views |
-
CalendarDateField doesn't work

13 May 2010 at 10:06pm Last edited: 13 May 2010 10:07pm
Hi.
I cannot make CalendarDateField to work with DOM.
My code is:class Item extends DataObject {
public static $db = array(
"Date" => "Date",
);function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push(new CalendarDateField('Date'));
return $fields;
}}
class ItemList extends Page {
function getCMSFields() {
$fields = parent::getCMSFields();
$manager = new DataObjectManager(
$this,
'Items',
'Item',
array(
"Date" => "Date",
),
null
);
$fields->addFieldToTab('Root.Content.Collection',$manager);
return $fields;
}}
Every other field in popup works perfect, except I don't get any Date fields, just a simple TextField shows up for 'Date'.
What am I missing? -
Re: CalendarDateField doesn't work

13 May 2010 at 10:10pm
Just noticed that DatePickerField doesn't work also...
-
Re: CalendarDateField doesn't work

14 May 2010 at 2:39pm
I had the same issue with CalendarDateField. Changed the code to DatePickerField and it seems to work fine.
Alternatively I had CalendarDateField using specifying showcalendar in the setConfig.
$field = new DateField(....);
$field->setConfig('showcalendar', true);This link has more information on the problem - seems to be a v2.4 issue
http://www.silverstripe.org/general-questions/show/283185?start=0 -
Re: CalendarDateField doesn't work

25 May 2010 at 9:19pm
Hi. Sorry for not responding for so long.
My SS version is 2.3.7
Where do I check the DOM version?Still can't make it work.
-
Re: CalendarDateField doesn't work

25 May 2010 at 9:35pm Last edited: 25 May 2010 9:36pm
Alright, nvm all, I'm an idiot 8]
The problem was just in front of our eyes:$manager = new DataObjectManager(
$this,
'Items',
'Item',
array(
"Date" => "Date",
),null
'getCMSFields_forPopup'
);Thx all for responding, you can close this.
-
Re: CalendarDateField doesn't work

28 May 2010 at 8:25pm
I am also having trouble getting the CalendarDateField / DatePickerField to show up in the DataObjectManager pop-ups. The same goes for the DropdownField and SimpleHTMLEditorField. All of them just show up as regular TextareaFields (except for the CalendarDateField, which shows up as a TextField).
Could this have anything to do with the fact that I'm running version 2.4.0 of Silverstripe? If so, is there any scheduled date for a 2.4.0 release of DataObjectManager? This is a great module, so I'm hoping so
-
Re: CalendarDateField doesn't work

29 May 2010 at 1:47am
The trunk has been on 2.4 for a while. For 2.3 versions, see the "2.3 branch" sticky.
| 2078 Views | ||
| Go to Top | Next > |


