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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DatePickerField not popping up calendar

Go to End

30 Posts   7572 Views


Forum Moderator, 4102 Posts

16 September 2009 at 2:10am

This is bizarre. Shawn, what is the difference in the output of using BaseHref() vs leaving it out in terms of the path it creates in your source code?

When I use something like:


The result in my source code is:

<script src=""></script>

So it shouldn't make a difference. The Requirements class must be thinking that file doesn't exist for some reason.

Just humor me, and get the result of Director::fileExists('jsparty/jquery/jquery.js'); for me. My expectation is that it will come back false.

Shawn Parr

Community Member, 60 Posts

16 September 2009 at 2:20am

I know, it is totally crazy.

I changed the DatePickerField.php file to this:

function Field() {
  	Requirements::javascript($this->BaseHref() . "jsparty/jquery/plugins/livequery/jquery.livequery.js");
		if(Director::fileExists('jsparty/jquery/jquery.js')) {
			Requirements::customScript("alert('File Exists')");
		} else {
			Requirements::customScript("alert('File does not exist')");

The result was 'File Exists.' I then removed it from there and added it to DataObjectManager.php and got 'File Exists.' Which makes absolutely no sense whatsoever.

If you would like me to do anything else, or format the code differently, please let me know. I'm fairly open for this stuff today, as I'm working on integrating some javascript things and not under specific deadlines today or tomorrow.


Community Member, 323 Posts

19 September 2009 at 4:59am


In my case, this error ('jQuery is not defined') was only happening in my 'live' shared host and not in the local WAMP server I use for development. I found it when trying to attach images from the Assets folder to pages through a ImageDataObjectManager: the Assets dropdown was showing up, but selecting a folder did not triggered the loading of the images.

Hope it helps,


Forum Moderator, 4102 Posts

19 September 2009 at 5:18am

Right, I get what the error is and when it happens, but what I'm trying to figure out is why it only happens on some systems. Are there any notable differences between your dev and production environments?


Community Member, 323 Posts

22 September 2009 at 3:30am


I don't know what is the relevant information concerning configuration differences, but I know that to install SS in my shared host I have to manually modify some lines of ManifestBuilder (replacing $baseDir with '//'), something related to PHP running in safe_mode with open_basedir = '/'.

Also my local development server is WAMP (WampServer 2.0) and the live one is LAMP, but I don't think it matters.

Best regards,


Forum Moderator, 4102 Posts

26 September 2009 at 3:36am

Well, guys. The fix is in. I've decided to stop wondering why and just go with what works. Thank you all so much for your diligent testing.


Community Member, 34 Posts

19 November 2009 at 5:22am

Edited: 19/11/2009 5:22am

I also had this issue on Silverstripe 2.3.3 with event calendar r83. I followed the solution at

Thanks for everyone posting and testing this. I guess I should have dug deeper prior to my posting it as a separate problem. Thanks!


Community Member, 4 Posts

24 March 2010 at 12:05pm

I am getting the same problem with the DatePickerField not displaying. Javascript errors throw the error "jQuery is not defined".

I am running the following:

-Silverstripe 2.3.7 (was having the same error in 2.3.3 and thought may upgrading would fix it, but no)