jQueryUI_DatePicker 404

Topics: Writing modules
Apr 8, 2012 at 12:30 AM

I'm trying to implement the date picker jQueryUI plugin.

At the top of my view, I have this code:

@{ 
	Script.Require("jQueryUI").AtHead();
	Style.Require("jQueryUI_DatePicker").AtHead();
}

The date picker works just fine, except it's not pulling in the necessary files for the styling.

I get the following errors in firebug:

"NetworkError: 404 Not Found - http://localhost:30320/OrchardLocal/Modules/Orchard.jQuery/Styles/ui.datepicker.css"
"NetworkError: 404 Not Found - http://localhost:30320/OrchardLocal/Modules/Orchard.jQuery/Styles/ui.timepickr.css"
"NetworkError: 404 Not Found - http://localhost:30320/OrchardLocal/Modules/Orchard.jQuery/Styles/jquery-ui-1.8.16.custom.css"

I'm sure I'm doing something wrong, but many googles later, I am unable to find out what I'm supposed to do.

Apr 8, 2012 at 7:49 AM

Change your script as follows:

@{
Style.Require("jQueryUI_DatePicker").AtHead();
Script.Require("jQueryUI_DatePicker").AtFoot();
}

Apr 9, 2012 at 7:07 AM

Thanks for the tip. Unfortunately, I get this error using the code you provided:
 

"NetworkError: 404 Not Found - http://localhost:30320/OrchardLocal/Modules/Orchard.jQuery/Styles/jquery-ui-1.8.16.custom.css"
"NetworkError: 404 Not Found - http://localhost:30320/OrchardLocal/Modules/Orchard.jQuery/Styles/ui.datepicker.css"

Apr 20, 2012 at 12:29 AM

I've got this project ready for the customer. The only thing left to fix is the jQueryUI style for the datepicker plugin. Could it be something with the way I have my local environment set up?

Coordinator
Apr 20, 2012 at 12:58 AM

No, it's a known issue: the web.config was missing in that directory. You can copy the one from its Scripts sibling.

Apr 20, 2012 at 4:37 AM

Perfect. That fixed it.

 

Thanks for the heads up, bertrandleroy!