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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DatePickerField not working in Admin popup


Reply


497 Views

Avatar
lozhowlett

Community Member, 146 Posts

25 November 2011 at 1:47am

Edited: 25/11/2011 4:06am

Hi Everyone

For some odd reason I cant get the date picker to work, when I click nothing happens... this is the error console output which suggests its not finding the jquery file!

Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.livequery.js:226Uncaught ReferenceError: jQuery is not defined
jquery.metadata.js:148Uncaught ReferenceError: jQuery is not defined
dom_jquery_ui.js:18Uncaught ReferenceError: jQuery is not defined
datepicker_init.js:13Uncaught ReferenceError: jQuery is not defined
2Refused to set unsafe header "Connection"
jquery.livequery.js:226Uncaught ReferenceError: jQuery is not defined
jquery.metadata.js:148Uncaught ReferenceError: jQuery is not defined
dom_jquery_ui.js:18Uncaught ReferenceError: jQuery is not defined
datepicker_init.js:13Uncaught ReferenceError: jQuery is not defined
2Refused to set unsafe header "Connection"

This is the code....

<?php
class TvAiring extends DataObject {

   public static $db = array(
'Date' => 'Date',
'Time' => 'Time',
'Channel' => 'Text',
'Show' => 'Text',
'Round' => 'Text'
   );

static $has_one = array (
'TvShed' => 'TvShed'
);

function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push(new DatePickerField('Date'));
$fields->push(new TimeField('Time'));
$fields->push(new TextField('Channel'));
$fields->push(new TextField('Show'));
$fields->push(new TextField('Round'));
return $fields;
}

}

thanks in advance!