-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Common errors
LucileDT edited this page Jul 4, 2017
·
3 revisions
These error is, probably, a config error. Check if your tmpl_path
option is correct, and the tmpls are publics
Tooltip is provided by bootstrap. Some old versions, uses attr
and not tooltip
. If updated your bootstrap is not an option, you can change $('*[data-toggle="tooltip"]').tooltip({container: 'body'});
for $('*[data-toggle="tooltip"]').attr({container: 'body'});
. More info this issue
1) Make sure you have set the modal
parameter
var calendar = $('#calendar').calendar({
[...]
modal: "#calendar-events-modal",
[...]
});
2) Make sure the modal
parameter refer to a valid id
var calendar = $('#calendar').calendar({
[...]
modal: "#calendar-events-modal",
[...]
});
console.debug($('#calendar-events-modal')); // this should display a DOM element in the browser console
3) If your calendar initialization is not waiting for the document to be ready, the HTML of the modal should be written before the javascript
<div class="modal fade" id="calendar-events-modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
[...]
</div>
<div id="calendar-events-modal-description" class="modal-body"></div>
<div class="modal-footer">
[...]
</div>
</div>
</div>
</div>
<script>
var calendar = $('#calendar').calendar({
[...]
modal: "#calendar-events-modal",
[...]
});
</script>
ℹ️ You can also wait for the document to be ready:
$(document).ready(function () {
var calendar = $('#calendar').calendar({
[...]
modal: "#calendar-events-modal",
[...]
});
});