I can't get bootstrap-datepicker (https://github.com/uxsolutions/bootstrap-datepicker) to initialize the proper way or call any methods or events on it.
I'm using Laravel 5.4.7 / Vue 2.3.3 / jQuery 3.1.0
My html look like this:
<input type="text" data-provide="datepicker" />
But when I try to initialize the datepicker using the "official" way it doesn't set any of the properties (no errors either):
$('.datepicker').datepicker({
todayHighlight: true
});
It doesn't matter where I place the code (beginning, end, vue created-method, vue mounted-method, $nextTick).
However setting the values like this works:
$.fn.datepicker.defaults.todayHighlight = true;
Unfortunately since non of the other methods or events seem to work either just using the $.fn.datepicker.defaults
is not enough.
Does anyone have a clue on what might be wrong?
class = "datepicker"
in your input field