I have to open a popover when event is clicked and if you click anywhere outside it should get dismissed so i'm using popover with focus trigger it is not getting dismissed when I click outside the event
following is the js code i'm using
$(document).ready(function () {
// page is now ready, initialize the calendar...
var eventsArray = [ {
title: 'Test2',
start: new Date("2015-04-21")
}];
$('#calendar').fullCalendar({
// put your options and callbacks here
header: {
left: '', //today',
center: 'title',
right: ''
},
defaultView: 'agendaDay',
defaultDate: '2015-04-21',
editable: true,
allDaySlot: false,
selectable: true,
events: eventsArray,
eventClick: function(calEvent, jsEvent, view) {
$(this).popover({
placement : 'bottom',
title : 'Appointment Actions',
html : true,
content :"test",
trigger : 'focus'
}).popover('show');
$(this).attr('tabindex', -1);
}
});
});
following is the js fiddle link: https://jsfiddle.net/kd7e2xpc/2/