I am making a website that anyone can embed our calendar using iFrame. That calendar is using FullCalendar and qTip.
I am using FullCalendar with a default view of agendaWeek, the problem with that is when I click on an event the qtip appears, but when I scroll down, the qtip popup position is like fixed. It is very difficult to explain so here's the jsfiddle
Here's my code:
$("#calendar").fullCalendar({
defaultView: 'agendaWeek',
allDayDefault: false,
allDaySlot: false,
columnFormat:{
week: 'ddd dS'
},
events:{
url:"http://<?=$rootUrl;?>/studios/fetch_event_calendar_public/",
data:{
id:"<?=$studio_id;?>",
}
},
eventRender: function(event,element,view){
... ... ... ..
jQuery(element).qtip({ // Grab some elements to apply the tooltip to
id: 'calendar',
content: {
text: html,
button: 'Close',
title: 'Event Details',
},
style: 'qtip-light',
position: {
my: 'bottom center',
at: 'top center'
},
show:{
event:'click',
},
hide:{
event: 'unfocus'
},
});
},
windowResize: function( view ) {
calendar.fullCalendar('option', 'height', $(window).height() - 40);
}
});
So what I want here is that when the fullcalendar is scrolled down or up, the qtip should not have a position of fixed, it should just stay where the event is.
Your help will be greatly appreciated! Thanks!
Related
I created a popup with my custom css and js show hide functions. Now I want to place the calendar to that popup.
I tried
$(document).on('click', '.cliker', function () {
$(".succes_msg").remove();
$show = $(this).attr('pkid');
$(this).addClass('activer');
$("input[name=startTime]").val($(this).find("span").eq(0).html()).timepicker();
$(".addbtn").attr('pkId', $show);
$('#calendar').fullCalendar({
defaultView: 'basicWeek',
aspectRatio: 1.5,
header : {
left : 'prev,next',
center: 'title',
right : ''
},
dayOfMonthFormat: 'ddd MMM/MM',
firstDay: 4,
eventLimit: true,
render: true,
height: 250,
buttonText: {
today: 'today',
month: 'month' },
eventSources: [{
url: '{{URL::to(route('get_calender_data'))}}',
type: 'get',
data: {cinema: 0}
}],
});
$(".modelPophldr,.editShow").show();
$(".editShow").animate({'margin-top': '25px'});
});
Like above there I am showing the popup after the fullcalendar rendering.
How to fix it?
Edit...
Right now the calendar is coming with only right and left arrows, but the calendar is not loaded. When I click on the next button it will show the calendar with events perfectly.
display: none removes the element out of the flow of the HTML so you need to call your event when your element becomes visible that why your plugin is working when you click on arrows
try to initialize your plugin after
$(".modelPophldr,.editShow").show();
I am having a popup form. I have events in fullcalendar page.
I need to pop up this form on click of any event from full calendar.
Have tried full calendar with modal but based on my requirement, i require my pop up form only.I tried with window.open("url"), but it goes to next page.
Here's my code but it need to create a clickable popup.I have added my form through an image below, which shall popup on click of event. kindly acknowledge me asap..
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
utc: true,
header: {
left: 'prev,next today EventButton',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
droppable: true,
events: [
{
title: 'All Day Event',
start: '2016-07-01',
end: '2016-07-01'
},
{
title: 'Long Event',
start: '2016-07-07',
end: '2016-10-08'
}
],
eventClick: function(event, jsEvent, view) {
console.log(event.id);
window.open("<?php echo base_url() ?>common/calendar/form_calendar");
}
});
});
Am re sizing the height of the full calendar to fit in my screen. And am also limiting the events displayed in month view. So, now when I click +'x'more button, event container popup is coming at the bottom of the screen.
If am not altering the height, event container popup is aligned properly.
Please let me know how to fix popup alignment issue when calendar height is re sized.
Below is my code and attached the screenshot of calendar view
$('#calendar').fullCalendar({
now: new Date(),
editable: false,
aspectRatio: 1.8,
height: 200,
selectable: true,
scrollTime: '00:00',
header: {
left: 'prevYear,prev,next,nextYear today',
center: 'title',
right: 'timelineDay,timelineThreeDays,agendaWeek,month'
},
dayClick: function(date, jsEvent, view) {
var view = $('#calendar').fullCalendar('getView');
if (view.name == 'month') {
$('#calendar').fullCalendar('gotoDate', date._d.toISOString().slice(0, 10));
$('#calendar').fullCalendar('changeView', "timelineDay");
}
},
defaultView: 'timelineDay',
views: {
timelineThreeDays: {
type: 'timeline',
duration: {
days: 3
}
}
},
eventOverlap: false,
resourceAreaWidth: '25%',
resourceLabelText: 'Reservations',
resourceGroupField: 'building',
resources: resourcesList,
events: eventList,
eventLimit: true,
eventRender: function(event, element) {
element.find('.fc-title').append(' ' + event.statusCode);
},
});
screenshot
I am using FullCalendar v2 and bootstrap v3.3.2. I am trying to show a popover inside of the slot where the user click. Here there an example that I try to do http://jsfiddle.net/5g396/ but the problem is that it uses FullCalendar v1 and I need FullCalendar V2.
This is my code, http://jsfiddle.net/beckymo/nmwyz269/, but the popover is only shown in the same position of the Calendar.
My questions is: How to show popover bootstrap v3.3.2. in FullCalendar v2 on the top of slot when the user click? Thanks!
$('#calendar-holder').fullCalendar({
header: {
left: 'prev, next',
center: 'title',
right: 'month, agendaWeek, agendaDay'
},
businessHours: {
start: '09:00',
end: '19:00',
dow: [1, 2, 3, 4, 5]
},
allDaySlot: false,
defaultView: 'agendaWeek',
lazyFetching: true,
firstDay: 1,
selectable: true,
timeFormat: {
agenda: 'h:mmt',
'': 'h:mmt'
},
dayClick: function (date, jsEvent, view) {
$(this).popover({
title: 'haha',
placement: 'right',
content: 'haha',
html: true,
container: 'body'
});
$(this).popover('show');
}
});
Thanks!!!
Firstly you need add the option "selectable: true" because it create a div inside of slot where you click.
Secondly you can use this div as selector (.fc-highlight") for call popover like this:
dayClick: function (date, jsEvent, view) {
$(".fc-highlight").popover({
title: 'haha',
placement: 'right',
content: 'haha',
html: true,
container: 'body'
});
$(".fc-highlight").popover('show');
}
I have full calendar with some events. I have binded events from a json file. When i mouse hover on the particular event in the calendar it will show a popover. But when i move my mouse to the popover, the popover disappears. How to keep the popover visible when i move my mouse into the popover ? i have gone through other examples but didn't worked for me.
popover bootstap
link 2
code :
$('#calendar').fullCalendar({
//$.fn.popover.defaults.container = 'body';
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
contentHeight: 300,
height: 200 ,
eventRender: function(event, element) {
element.popover({
title: event.title1,
placement: 'auto',
html: true,
trigger: 'hover',
animation:'true',
content: event.msg,
container: 'body'
});
$('body').on('click', function(e) {
if (!element.is(e.target) && element.has(e.target).length === 0 && $('.popover').has(e.target).length === 0)
element.popover('hide');
});
},
events: eventData
});
}
});
I don't know if can be an acceptable solution for you, but as alternative you can consider to 'toggle' popover on eventMouseover:
eventMouseover: function (event, jsEvent) {
$(this).popover({
title: event.name,
placement: 'right',
trigger: 'manual',
content: 'foo',
container: '#calendar'
}).popover('toggle');
}
In this way popover stays on top until you re-hover on event (Bootstrap v3.3.2, FullCalendar v2.6.1).