Angular 6 fullCalendar Display popover on mouseover event












2















I'm using fullCalendar in an Angular 6 application. I want to display fullcalendar popover while hovering over an event like this. I want to achieve this via my ts file without using jquery. Here's my code.



HTML:



 <section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar
[options]="calendarOptions"
[(eventsModel)]="events"
(eventClick)="handleClick($event.detail.event.data)"
(eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>

<ng-template #calendarPopover>
<h3>{{toolData .title}}</h3>
</ng-template>


TS File:



mouseOver(event, content){
var data = event.detail.event.data;
this.toolData = data;
console.log(this.toolData);
}


Similar to a post here



I want to get the ng-template to open up on display. I have tried ngbPopover but unlike ngbModal, ngbPopover doesn't have an open method that would simply open up the popover by calling it's method since it's a directive.



If anyone knows any solution using either the fullCalendar popover method (without jquery) or displaying via ng-template, any help in this regard would be appreciated.










share|improve this question

























  • fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

    – ADyson
    Nov 22 '18 at 9:44











  • Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

    – hira12
    Nov 22 '18 at 9:52











  • Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

    – ADyson
    Nov 22 '18 at 9:56











  • There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

    – hira12
    Nov 22 '18 at 10:04











  • well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

    – ADyson
    Nov 22 '18 at 10:12


















2















I'm using fullCalendar in an Angular 6 application. I want to display fullcalendar popover while hovering over an event like this. I want to achieve this via my ts file without using jquery. Here's my code.



HTML:



 <section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar
[options]="calendarOptions"
[(eventsModel)]="events"
(eventClick)="handleClick($event.detail.event.data)"
(eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>

<ng-template #calendarPopover>
<h3>{{toolData .title}}</h3>
</ng-template>


TS File:



mouseOver(event, content){
var data = event.detail.event.data;
this.toolData = data;
console.log(this.toolData);
}


Similar to a post here



I want to get the ng-template to open up on display. I have tried ngbPopover but unlike ngbModal, ngbPopover doesn't have an open method that would simply open up the popover by calling it's method since it's a directive.



If anyone knows any solution using either the fullCalendar popover method (without jquery) or displaying via ng-template, any help in this regard would be appreciated.










share|improve this question

























  • fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

    – ADyson
    Nov 22 '18 at 9:44











  • Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

    – hira12
    Nov 22 '18 at 9:52











  • Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

    – ADyson
    Nov 22 '18 at 9:56











  • There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

    – hira12
    Nov 22 '18 at 10:04











  • well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

    – ADyson
    Nov 22 '18 at 10:12
















2












2








2








I'm using fullCalendar in an Angular 6 application. I want to display fullcalendar popover while hovering over an event like this. I want to achieve this via my ts file without using jquery. Here's my code.



HTML:



 <section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar
[options]="calendarOptions"
[(eventsModel)]="events"
(eventClick)="handleClick($event.detail.event.data)"
(eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>

<ng-template #calendarPopover>
<h3>{{toolData .title}}</h3>
</ng-template>


TS File:



mouseOver(event, content){
var data = event.detail.event.data;
this.toolData = data;
console.log(this.toolData);
}


Similar to a post here



I want to get the ng-template to open up on display. I have tried ngbPopover but unlike ngbModal, ngbPopover doesn't have an open method that would simply open up the popover by calling it's method since it's a directive.



If anyone knows any solution using either the fullCalendar popover method (without jquery) or displaying via ng-template, any help in this regard would be appreciated.










share|improve this question
















I'm using fullCalendar in an Angular 6 application. I want to display fullcalendar popover while hovering over an event like this. I want to achieve this via my ts file without using jquery. Here's my code.



HTML:



 <section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar
[options]="calendarOptions"
[(eventsModel)]="events"
(eventClick)="handleClick($event.detail.event.data)"
(eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>

<ng-template #calendarPopover>
<h3>{{toolData .title}}</h3>
</ng-template>


TS File:



mouseOver(event, content){
var data = event.detail.event.data;
this.toolData = data;
console.log(this.toolData);
}


Similar to a post here



I want to get the ng-template to open up on display. I have tried ngbPopover but unlike ngbModal, ngbPopover doesn't have an open method that would simply open up the popover by calling it's method since it's a directive.



If anyone knows any solution using either the fullCalendar popover method (without jquery) or displaying via ng-template, any help in this regard would be appreciated.







javascript angular typescript fullcalendar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 7:40







hira12

















asked Nov 22 '18 at 6:32









hira12hira12

135




135













  • fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

    – ADyson
    Nov 22 '18 at 9:44











  • Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

    – hira12
    Nov 22 '18 at 9:52











  • Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

    – ADyson
    Nov 22 '18 at 9:56











  • There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

    – hira12
    Nov 22 '18 at 10:04











  • well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

    – ADyson
    Nov 22 '18 at 10:12





















  • fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

    – ADyson
    Nov 22 '18 at 9:44











  • Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

    – hira12
    Nov 22 '18 at 9:52











  • Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

    – ADyson
    Nov 22 '18 at 9:56











  • There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

    – hira12
    Nov 22 '18 at 10:04











  • well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

    – ADyson
    Nov 22 '18 at 10:12



















fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

– ADyson
Nov 22 '18 at 9:44





fullCalendar itself doesn't have a built-in popover method. You would need to use something like Bootstrap's "popper" library or a similar thing - maybe something designed for Angular would be sensible.

– ADyson
Nov 22 '18 at 9:44













Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

– hira12
Nov 22 '18 at 9:52





Yes, I've already mentioned that. There's a bootstrap component for Angular that I'm trying to use but it's not working, don't know what I'm doing wrong here.

– hira12
Nov 22 '18 at 9:52













Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

– ADyson
Nov 22 '18 at 9:56





Ok. I was confused because you said "using either the fullCalendar popover method "...but there's no such thing

– ADyson
Nov 22 '18 at 9:56













There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

– hira12
Nov 22 '18 at 10:04





There is but only if you're using jquery. Such as this stackoverflow.com/questions/28992871/…

– hira12
Nov 22 '18 at 10:04













well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

– ADyson
Nov 22 '18 at 10:12







well fullCalendar requires jQuery, so you must be running jQuery. Why do you care about not using jQuery?

– ADyson
Nov 22 '18 at 10:12














1 Answer
1






active

oldest

votes


















0














you can do that simple by using ng-container and *ngIf or [hidden]



instead using



<ng-template #calendarPopover></ng-template>


use



<ng-container *ngIf="isHidden" #calendarPopover>...</ng-container>


notice: we used ng-container and we controlling it's display by *ngIf



TS



import { Component } from '@angular/core';

@Component({
selector: '...',
templateUrl: '...',
styleUrls: [ '...' ]
})
export class AppComponent {
isHidden = false;
}


trigger



<section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar (mouseenter)="isHidden = !isHidden" (mouseleave)="isHidden = !isHidden" [options]="calendarOptions" [(eventsModel)]="events (eventClick)="handleClick($event.detail.event.data)" (eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>


notice: (mouseenter) and mouseleave look at the Demo






share|improve this answer
























  • Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

    – hira12
    Nov 22 '18 at 7:32













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53425087%2fangular-6-fullcalendar-display-popover-on-mouseover-event%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














you can do that simple by using ng-container and *ngIf or [hidden]



instead using



<ng-template #calendarPopover></ng-template>


use



<ng-container *ngIf="isHidden" #calendarPopover>...</ng-container>


notice: we used ng-container and we controlling it's display by *ngIf



TS



import { Component } from '@angular/core';

@Component({
selector: '...',
templateUrl: '...',
styleUrls: [ '...' ]
})
export class AppComponent {
isHidden = false;
}


trigger



<section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar (mouseenter)="isHidden = !isHidden" (mouseleave)="isHidden = !isHidden" [options]="calendarOptions" [(eventsModel)]="events (eventClick)="handleClick($event.detail.event.data)" (eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>


notice: (mouseenter) and mouseleave look at the Demo






share|improve this answer
























  • Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

    – hira12
    Nov 22 '18 at 7:32


















0














you can do that simple by using ng-container and *ngIf or [hidden]



instead using



<ng-template #calendarPopover></ng-template>


use



<ng-container *ngIf="isHidden" #calendarPopover>...</ng-container>


notice: we used ng-container and we controlling it's display by *ngIf



TS



import { Component } from '@angular/core';

@Component({
selector: '...',
templateUrl: '...',
styleUrls: [ '...' ]
})
export class AppComponent {
isHidden = false;
}


trigger



<section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar (mouseenter)="isHidden = !isHidden" (mouseleave)="isHidden = !isHidden" [options]="calendarOptions" [(eventsModel)]="events (eventClick)="handleClick($event.detail.event.data)" (eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>


notice: (mouseenter) and mouseleave look at the Demo






share|improve this answer
























  • Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

    – hira12
    Nov 22 '18 at 7:32
















0












0








0







you can do that simple by using ng-container and *ngIf or [hidden]



instead using



<ng-template #calendarPopover></ng-template>


use



<ng-container *ngIf="isHidden" #calendarPopover>...</ng-container>


notice: we used ng-container and we controlling it's display by *ngIf



TS



import { Component } from '@angular/core';

@Component({
selector: '...',
templateUrl: '...',
styleUrls: [ '...' ]
})
export class AppComponent {
isHidden = false;
}


trigger



<section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar (mouseenter)="isHidden = !isHidden" (mouseleave)="isHidden = !isHidden" [options]="calendarOptions" [(eventsModel)]="events (eventClick)="handleClick($event.detail.event.data)" (eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>


notice: (mouseenter) and mouseleave look at the Demo






share|improve this answer













you can do that simple by using ng-container and *ngIf or [hidden]



instead using



<ng-template #calendarPopover></ng-template>


use



<ng-container *ngIf="isHidden" #calendarPopover>...</ng-container>


notice: we used ng-container and we controlling it's display by *ngIf



TS



import { Component } from '@angular/core';

@Component({
selector: '...',
templateUrl: '...',
styleUrls: [ '...' ]
})
export class AppComponent {
isHidden = false;
}


trigger



<section class="main-content">
<div *ngIf="calendarOptions">
<ng-fullcalendar #ucCalendar (mouseenter)="isHidden = !isHidden" (mouseleave)="isHidden = !isHidden" [options]="calendarOptions" [(eventsModel)]="events (eventClick)="handleClick($event.detail.event.data)" (eventMouseOver)="mouseOver($event, calendarPopover)">
</ng-fullcalendar>
</div>
</section>


notice: (mouseenter) and mouseleave look at the Demo







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 7:05









Amir FawzyAmir Fawzy

24118




24118













  • Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

    – hira12
    Nov 22 '18 at 7:32





















  • Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

    – hira12
    Nov 22 '18 at 7:32



















Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

– hira12
Nov 22 '18 at 7:32







Thank you for the reply. This is not what I exactly want to achieve. I want popover to display on an event and the popover has to show information related to that event only. Like this: fullcalendar.io/docs/event-tooltip-demo

– hira12
Nov 22 '18 at 7:32






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53425087%2fangular-6-fullcalendar-display-popover-on-mouseover-event%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]