We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

using quickInfoTemplates

I'm currently trying to use the quickInfoTemplates to display a custom quick info for when a user clicks on an appointment.  However, I'm getting errors around quickInfoTemplates not actually being a valid property, and furthermore, the the model for quickInfoTemplates doesn't seem to exist either.

Could you provide an example for how to customize the quickInfo card that pops up when clicking on an appointment?

7 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team December 3, 2018 04:32 AM UTC

 
Thank you for contacting Syncfusion support. 
 
Kindly refer the below UG link to know more about the quick popup customization. 
 
 
Regards, 
Karthigeyan 
 



DM Derrick Morin May 11, 2020 08:28 PM UTC

The example mentions setting the quickInfoTemplates property but I don't see anywhere in the source that property being set.  Am I missing something?


VM Vengatesh Maniraj Syncfusion Team May 12, 2020 03:30 AM UTC

Hi Derrick, 

Thanks for contacting Syncfusion Support. 

Sorry for the inconvenience. The URL for the quickInfoTemplate has been changed and kindly refer to the below UG link to know more about the quick popup customization. 


Regards, 
Vengatesh  



DM Derrick Morin May 15, 2020 06:44 PM UTC

Hi,

I was referring to that very page.  Where in the source is the quickInfoTemplates  property set?  I'm not seeing it any where.  Could you send me a stackblitz.com/ link with the example?

thanks



VM Vengatesh Maniraj Syncfusion Team May 18, 2020 04:16 AM UTC

Hi Derrick, 

The quickInfoTemplates contains three sub-options to customize the popup. There are, 

Header – customize the header by making use of quickInfoTemlatesHeader  
<!-- Header template --> 
    <ng-template #quickInfoTemplatesHeader let-data> 
      <div *ngIf="data.elementType == 'cell' || data.elementType == 'event'"> 
        <div class="e-popup-header"> 
          <div class="e-header-icon-wrapper"> 
 
            <button class="e-close e-close-icon e-icons" title="Close" (click)="onCloseClick($event)"></button> 
          </div> 
        </div> 
      </div> 
    </ng-template> 

Content – customize the content of the popup by making use of quickInfotemplatesContent 
 <ng-template #quickInfoTemplatesContent let-data> 
      <div *ngIf="data.elementType == 'cell'" class="e-cell-content"> 
        <form class="e-schedule-form"> 
          <div style="padding:10px"> 
            <input class="subject e-field e-input" type="text" name="Subject" placeholder="Title" style="width:100%"> 
          </div> 
          <div style="padding:10px"> 
            <input class="location e-field e-input" type="text" name="Location" placeholder="Location" style="width:100%"> 
          </div> 
           <div style="padding:10px"> 
            <input class="description e-field e-input" type="text" name="Description" placeholder="Description" style="width:100%"> 
          </div> 
        </form> 
      </div> 
      <div *ngIf="data.elementType == 'event'" class="e-event-content"> 
        <div class="subject">{{data.Subject}}</div> 
        <div class="start-time">Start: {{data.StartTime.toLocaleString()}}</div> 
        <div class="end-time">End: {{data.EndTime.toLocaleString()}}</div> 
        <div *ngIf="data.Location != undefined && data.Location != ''" class="location">Location: {{data.Location}}</div> 
        <div *ngIf="data.Description != undefined && data.Description != ''" class="description">Description: {{data.Description}}</div> 
      </div> 
    </ng-template> 
 
Footer  - customize the footer of the popup by making use of quickInfoTemplatesFooter 
 <ng-template #quickInfoTemplatesFooter let-data> 
      <div *ngIf="data.elementType == 'cell'" class="e-cell-footer"> 
        <div class="left-button"> 
          <button class="e-event-details" title="Extra Details" (click)="onDetailsClick($event)">More Details</button> 
        </div> 
        <div class="right-button"> 
          <button class="e-event-create" title="Add" (click)="onAddClick($event)">Add</button> 
        </div> 
      </div> 
      <div *ngIf="data.elementType == 'event'" class="e-event-footer"> 
        <div class="left-button"> 
          <button class="e-delete" title="Delete" (click)="onDeleteClick($event)">Delete</button> 
          <button *ngIf="data.RecurrenceRule != undefined && data.RecurrenceRule != ''" class="e-delete-series" 
            title="Delete" (click)="onDeleteClick($event)">Delete Series</button> 
        </div> 
        <div class="right-button"> 
          <button class="e-edit" title="Edit" (click)="onEditClick($event)">Edit</button> 
          <button *ngIf="data.RecurrenceRule != undefined && data.RecurrenceRule != ''" class="e-edit-series" 
            title="Edit" (click)="onEditClick($event)">Edit Series</button> 
        </div> 
      </div> 
    </ng-template> 
  
For more reference, please check the below sample. 


Please check the sample and get back to us for further assistance. 

Regards, 
Vengatesh 



DM Derrick Morin May 18, 2020 08:25 PM UTC

Vengatesh,

Thank you for the example.  It works great on StackBlitz.  I've copied the <ng-template #quickInfoTemplatesContent ...> element into my <ejs-schedule></ejs-schedule> and when I click on an event or cell in the rendered scheduler I get the following error in the console:

ERROR TypeError: this.parent.getQuickInfoTemplatesContent(...) is not a function
    at QuickPopups.getPopupContent (ej2-schedule.es2015.js:5678)
    at QuickPopups.eventClick (ej2-schedule.es2015.js:5605)
    at Observer.notify (ej2-base.es2015.js:1953)
    at ComponentBase.notify (ej2-base.es2015.js:6667)
    at ComponentBase.<anonymous> (ej2-schedule.es2015.js:4631)
    at ComponentBase.push../node_modules/@syncfusion/ej2-angular-base/src/component-base.js.ComponentBase.trigger (component-base.js:256)
    at MonthEvent.eventClick (ej2-schedule.es2015.js:4611)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41344)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)


I've stepped into the ej2-schedule.es2015.js file and it appears that this.quickInfoTemplatesContentFn is never set properly.  The templateParser() method is called with template = "#quickInforTemplatesContent" and document.querySelectorAll(template).length is zero which tells me that 
<ng-template #quickInfoTemplatesContent ...> has not been rendered to the page yet.

It seems like I am having a timing issue.  When is <ng-template #quickInfoTemplatesContent ...> supposed to be rendered to the DOM so that document.querySelectorAll(template) will return something?

thank you for your help,

Derrick


VM Vengatesh Maniraj Syncfusion Team May 19, 2020 05:51 AM UTC

Hi Derrick, 

Thanks for the update. 

We have tried to reproduce the reported issue in our previously updated sample but we couldn’t reproduce it. Could you please reproduce the issue in our updated sample to serve you better? 

Regards, 
Vengatesh 



Loader.
Live Chat Icon For mobile
Up arrow icon