datetimepicker
datetimepicker copied to clipboard
Breaking Change on Update from 2.4.5 to 2.5.4 datetimepicker is not a function
I upgraded datetimepicker from version 2.4.5
to version 2.5.4
but I'm getting an error saying that datetimepicker is not function.
Tested on most recent version of Chrome ATM: Version 53.0.2785.143 m (64-bit)
Is that a known issue? If so, is there an "Upgrade Guide"?
I've got the same issue, after update, datetimepicker is not a function.
Using the script-loader
worked for me with v2.5.4 :+1:
import $ from 'jquery';
import 'script!jquery-datetimepicker';
$('#elem').datetimepicker();
I had the same problem, my solution was moving the function call outside of the $( document ).ready()
@jberculo But isn't $(document).ready()
the place to set up such objects? Where do you set it up if not inside ready()?
@isapir True. Maybe it has it's own on document ready? It could not be a real solution, and only be working because of the fact that these files are cached on my side already.
In the examples, the code seems to reside in a doc ready, although it is using an old version of jQuery. It's quite strange...
Hi guys,
to solve the issue, take a look in the folder structure of the last version and the docs. The full library is located in the folder /build. Instead of load the jquery.datetimepicker.js and .css from the main path of the library, you can use the ones are in the folder /build (have sense to use them). Those files have the min version for js and css of the full library and load correctly the plugin.
The plugin use DateFormatter (Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format). The build version in /build includes this library, but the js in the main path do not.
I was already using that version, but it does not make a difference in my case.
Hi guys,
I have the same problem, and even loading the filesjquery-datetimepicker/build/jquery.datetimepicker.full.min.js
and jquery-datetimepicker/build/jquery.datetimepicker.min.css
still the error continues in which it is not a function .
Someone to help?
Hi guys,
I have the same problem, and even loading the files
jquery-datetimepicker/build/jquery.datetimepicker.full.min.js
andjquery-datetimepicker/build/jquery.datetimepicker.min.css
still the error continues in which it is not a function .Someone to help?
sorry
I managed to find my mistake
was loading the jquery.js file twice to the same place and maybe this was confusing the DOM