Recently, I encountered an issue while attempting to integrate Bootstrap datetimepicker into my clojurescript project. Here's the snippet of code I used:
(.datetimepicker (js/$ "#dateid")
Unfortunately, I kept running into a frustrating Uncaught TypeError related to the datetimepicker function.
Error: Uncaught TypeError: $(...).Bk is not a function
After some investigation, it seems that the culprit behind this error might be the aggressive optimization carried out by the Google Closure Compiler. To potentially solve this, one workaround involves creating an extern.js file and specifying the function names to prevent them from being overly optimized by the closure compiler.
Despite my efforts to tweak the extern.js file as suggested, the issue persists. My current extern.js file contains the following declarations:
var $ = function (arg1, arg2) {};
$.prototype.val = function(arg1) {};
var selectpicker = function() {};
$.datetimepicker = function(arg1) {};
var datetimepicker = function() {};
Even after making these adjustments, the same error keeps popping up. I'm at a loss and in need of guidance on correcting the extern.js configuration to prevent the bootstrap-datetimepicker functions from being excessively optimized and causing Unknown Type exceptions.