- Issue created by @danrod
Hi Daniel(danrod)!
I had the same issue with "jQuery-Timepicker-Addon" starting with Drupal 10.4.3 and the solution that worked for me is the following:The order of initiating libraries is important!
1. The jquery-ui.min.js should be initialized first!
2. "dependencies" have to be added manually and are mandatory!EX:
jquery_ui_timepicker_addon:
js:
libraries/jquery-ui.min.js: {}
your_path/jquery-ui-timepicker-addon.js: {}
your_path/jquery-ui-sliderAccess.js: {}
dependencies:
- core/jquery-ui
- jquery_ui/core
- jquery_ui/widget
- jquery_ui_datepicker/datepicker
- jquery_ui_slider/slider- 🇨🇦Canada danrod Ottawa
Hey @sergiu_ thanks, but this didn't work to me (in that order), would you have some time to create a MR?
- 🇨🇦Canada danrod Ottawa
Or perhaps I should create a MR and let's look this together.
- 🇨🇦Canada danrod Ottawa
Ohh Drupal 10, I am using Drupal 11 here, I'll switch
- Merge request !24Issue 3503668 by sergiu_: making the plugin jQuery-Timepicker-Addon to work. Thanks sergiu_ ! → (Merged) created by danrod
- 🇨🇦Canada danrod Ottawa
Worked gread, thanks @sergiu_ !
I'll try merge and try to see it working in Drupal 11. README.md needs to be updated for extra instructions
- 🇨🇦Canada danrod Ottawa
No sure why it is not working for D11, I'll do some investigation about the error:
I'm glad that the instructions worked for you on Drupal 10, @danrod!
I was receiving these kinds of errors (... is not a function) while debugging why it's not working for me, and the issue was that the "jquery-ui.min.js" library was initialized after "jquery-ui-timepicker-addon.js" and "timepicker-addon" couldn't access those properties.
Maybe some library is missing in Drupal 11.- Status changed to Needs work
19 days ago 3:15pm 12 April 2025 - 🇨🇦Canada danrod Ottawa
I'm think of just dropping support for this plugin and adding support for this one instead: https://flatpickr.js.org/examples/
This plugin is no longer supported and hast a lot of dependencies, let's see if the current Drupal Datetime field supports it.
- 🇨🇦Canada danrod Ottawa
I'll move this issue to "Fixed" for now, I already merged the MR to the 3.0.x branch and the fix seems to work for D10 instances. I am working on another issue to replace this plugin: https://www.drupal.org/project/timepicker/issues/3518920 ✨ Add support for the flatpickr plugin Active
Automatically closed - issue fixed for 2 weeks with no activity.