Angular 6 fullCalendar Display popover on mouseover event












4















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


















4















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
















4












4








4








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

235




235













  • 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














2 Answers
2






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














I created custom popover component with the help of ngx popover and tether.js for ng-full calendar .now popover can be shown on any elements. Now its not dependent on button only.



Here is demo url:
https://ngfullcalendarngxpopover.firebaseapp.com



Here is repo url:
https://github.com/raoshahid799/ng-full-calendar-ngx-popoverenter image description here






share|improve this answer

























    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

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    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

    24139




    24139













    • 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















    0














    I created custom popover component with the help of ngx popover and tether.js for ng-full calendar .now popover can be shown on any elements. Now its not dependent on button only.



    Here is demo url:
    https://ngfullcalendarngxpopover.firebaseapp.com



    Here is repo url:
    https://github.com/raoshahid799/ng-full-calendar-ngx-popoverenter image description here






    share|improve this answer






























      0














      I created custom popover component with the help of ngx popover and tether.js for ng-full calendar .now popover can be shown on any elements. Now its not dependent on button only.



      Here is demo url:
      https://ngfullcalendarngxpopover.firebaseapp.com



      Here is repo url:
      https://github.com/raoshahid799/ng-full-calendar-ngx-popoverenter image description here






      share|improve this answer




























        0












        0








        0







        I created custom popover component with the help of ngx popover and tether.js for ng-full calendar .now popover can be shown on any elements. Now its not dependent on button only.



        Here is demo url:
        https://ngfullcalendarngxpopover.firebaseapp.com



        Here is repo url:
        https://github.com/raoshahid799/ng-full-calendar-ngx-popoverenter image description here






        share|improve this answer















        I created custom popover component with the help of ngx popover and tether.js for ng-full calendar .now popover can be shown on any elements. Now its not dependent on button only.



        Here is demo url:
        https://ngfullcalendarngxpopover.firebaseapp.com



        Here is repo url:
        https://github.com/raoshahid799/ng-full-calendar-ngx-popoverenter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 days ago

























        answered Mar 14 at 11:19









        Shahid IslamShahid Islam

        362




        362






























            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







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()