This project is read-only.

TimePicker Add-on for Jquery UI

Topics: Troubleshooting
Jun 25, 2011 at 1:09 AM

Does anyone have experience using Trent Richardson's TimePicker add-on for JQuery UI inside of an Orchard site? I've used it in a standard MVC 3 project and it works great, but I can't seem to get it working in my site. Using the regular .datepicker works perfectly after adding a Script.Require for jQueryUI_DatePicker. I have that added plus the timepicker-addon from the site below (all registered in my manifest). Clicking on the input box does absolutely nothing, so I'm not getting any feedback on what the problem might be. It's called using $("#episodedate").datetimepicker(); instead of the JQueryUI syntax of $("#episodedate").datepicker(); I haven't altered the script at all, which is making me wonder if it's either not compatible with the version of JQuery in Orchard or if it's just conflicting with something.

Any other suggestions for a combined date/time picker for use in a custom Orchard Module?

Jun 25, 2011 at 8:54 AM

If you've got Firebug installed, do you see a Javascript error icon (in the bottom-right of the browser window)?

Also in Firebug, can you tell if the script file is definitely being loaded?

Jun 27, 2011 at 6:39 PM all of that loaded. It looks like there is an error in the JQuery function somewhere. It's telling me:

$tp.find("#ui_tpicker_hour_" + dp_id).slider is not a function
I added a Script.Require for jQueryUI_Slider, thinking that it needed that library to render the sliders for the hour/minute selections. I'm still getting the same error though. Is there another library that these could possibly be dependent upon that I'm missing?

Jun 27, 2011 at 6:41 PM
Edited Jun 27, 2011 at 6:45 PM

AH! Found it. The ResourceManifest.cs for the Orchard.Jquery project has a typo in it. The Slider library URL path is spelled "slidder", not "slider". I'll open a bug for that.

I modified the ResourceManifest.cs file manually, reloaded, and now my script runs fine. Thanks for helping me track that down.