Trent Richardson's Datetimepicker is not showing the time picker (only jQuery's date picker). Tested it 2 months ago and it is working properly. Just upgraded the JS last month.
This is the current js imports:
already tried .removeClass('hasDatepicker'); since it is appending to the class after initialization of datetimepicker
the line $('#dateId').datetimepicker({ is causing a Uncaught TypeError: Cannot call method 'dateId' of null, have to use jQuery instead of $
already tried reverting to jquery-1.7 and updating Trent's scripts to a later version but still experiencing the same problem.
I'm glad that @Sophie asked and answered this question because I had the same problem and hadn't been able to figure it out until seeing this post.
Apparently, my site loaded jquery-ui-1.8.18.custom.min.js
and then loaded another javascript file (e.g. my-site.min.js), which was a server-generated collection of smaller javascript files, all minified.
This bundle js file (e.g. my-site.min.js) contained jquery-ui-1.8.18.custom.min.js
too, so jquery-ui was getting loaded twice, which apparently caused the datetimepicker to NOT show the time fields.
I simply removed the line for jquery-ui-1.8.18.custom.min.js
(so that my site was now serving it up only once), and now datetimepicker works again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With