I am trying to use Bootstrap datetimepicker in my clojurescript project as below :
(.datetimepicker (js/$ "#dateid")
but am ending up with Uncaught TypeError for datetimepicker function.
Error: Uncaught TypeError: $(...).Bk is not a function
On some analysis I found a reason for this may be the optimization done by google closure compiler. A possible resolution for this is by creating extern.js file and adding function names so that the names are not optimized in the closure compiler .
I tried to modify my extern.js but it doesnt help My extern.js looks like this .
var $ = function (arg1, arg2) {};
$.prototype.val = function(arg1) {};
var selectpicker = function() {};
$.datetimepicker = function(arg1) {};
var datetimepicker = function() {};
I am still getting the same error .
I need to know whats wrong with my extern.js so that i can avoid the bootstrap-datetimepicker functions not getting optimized which causes Unknown Type exception