Is there something I'm missing? The action buttons cannot be displayed on a preview of the event

Currently in the process of developing an angular application featuring a calendar component to showcase events, I opted to utilize angular-calendar for the visual representation. While exploring the month view functionality, I encountered an issue where the action buttons failed to display, thus hindering the ability to access corresponding dialogs.

Notable screenshots include:

enter image description here

enter image description here

Following along with the example, I integrated a CalendarEventAction[] containing modify and delete options into my event configuration (excerpt provided below):

Simplified version found in calendar.component.ts:

actions: CalendarEventAction[] = [
{
  label: '<i class="fas fa-fw fa-pencil-alt"></i>',
  a11yLabel: 'Edit',
  onClick: ({ event }: { event: CalendarEvent }): void => {
    this.inspectEvent(event)
  },
},
{
  label: '<i class="fas fa-fw fa-trash-alt"></i>',
  a11yLabel: 'Delete',
  onClick: ({ event }: { event: CalendarEvent }): void => {
    this.events = this.events.filter((iEvent) => iEvent !== event);
    this.inspectEvent(event)
  },
}];

events: CalendarEvent[] = [
{
  start: startOfDay(new Date()),
  title: 'First event',
  end: endOfDay(new Date()),
  actions: this.actions,
}];

Seeking assistance as the button functionalities fail to appear despite following the prescribed steps outlined in the example. Any guidance would be appreciated!

Answer №1

If you want to use FontAwesome Icon buttons for your action buttons, make sure to include the necessary CSS to make them functional.

Don't forget to insert FontAwesome within the head section of your index.html.

<head>
  <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
</head>

Check out the demo here

This is how it will look:

https://i.stack.imgur.com/Ieq7c.png

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Change the type of an object to a different type

Within my class, I have set the type of range to IntervalRange. export class Test {range: IntervalRange;} Then, in the parent class, I initialize the value: export class TestInitializer { Create(){ return <Test>{ range: IntervalRange.i ...

"Issue with default select value in Angular using ngModel - one select element not setting default value, while another works fine

Why is this functioning properly? File: myComponent1.html <select id="BisMonat" class="form-control" [(ngModel)]="currentmonatbis"> <option [value]="01">Januar</option> <option [value]="02">Feb ...

Using any random function as a property value in a TypeScript React Component

I am facing a challenge in my React component where I need to define a property that can accept any arbitrary function which returns a value, regardless of the number of arguments it takes. What matters most to me is the return value of the function. Here ...

When attempting to transfer data from the parent component to child components, the data is appearing as undefined in the display

I have been working on passing data from a parent component to child components, but I keep encountering an issue where the data is showing as undefined. Below is the code snippet: Parent Component In this section, I have declared the variable part_data ...

What steps can I take to perform unit testing on a custom element?

While working on a project where I have a class that extends HTMLElement, I came across some interesting information in this discussion: https://github.com/Microsoft/TypeScript/issues/574#issuecomment-231683089 I discovered that I was unable to create an ...

What is the best way to implement promise function in a JavaScript functional method such as forEach or reduce?

I have implemented a promise function in the following way: // WORK let res = {approveList: [], rejectList: [], errorId: rv.errorId, errorDesc: rv.errorDesc}; for (let i = 0; i < rv.copyDetailList.length; i ++) { const item = rv.copyDetailList[i]; ...

What is the reason for the service not providing an encoded string as output?

A service has been created to encode passwords using the ts-md5 library in Angular: import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Md5 } from 'ts-md5/dist/md5'; @Injectab ...

Unexpected error encountered in Angular 2 beta: IE 10 displays 'Potentially unhandled rejection [3] SyntaxError: Expected'

Question regarding Angular 2 Beta: I am starting off with a general overview in the hopes that this issue is already recognized, and I simply overlooked something during my research. Initially, when Angular 2 Beta.0 was released, I managed to run a basic m ...

Sending VSCode to external functions

My primary entrypoint containing the activate() function is: extension.ts import * as vscode from "vscode"; import { subscribe } from "./eventListeners.ts"; export function activate(context: vscode.ExtensionContext) { vscode.command ...

Using Typescript: ForOf Iteration with Unknown Value Types

My journey began with a quick peek at this particular inquiry. However, the approach discussed there utilized custom typing. I am currently iterating over object entries using a for-of loop. Here's a snippet of the values I'm dealing with below. ...

Combining conditions and CSS classes within the ngClass directive in Angular

Is it possible to combine a condition and a class within the same "ngClass" in Angular? [ngClass]="{cssclass1 : object.cssclass1status , object.cssclass2}" The condition (bold) and CSS class (italic) can be used together. Previously, I have implemented t ...

In Angular 2, leverage a variable within the @Component styles

Here is a plunker link for you to check out: https://plnkr.co/edit/fzNJ7FLYxWbLPoxtYpEw?p=preview This is a basic angular application. I am using @ViewChild and nativeElement.offsetHeight to capture the height of a div. Can this number be used in the st ...

Angular - Filtering only ag-Grid information

I am currently working on implementing print functionality for ag-Grid in an angular project. I have a page that includes both content and ag-Grid data. When I attempt to use the print functionality, both the content and grid data are being printed. Howeve ...

Angular 2 - Graphic Representation Tool for Visualizing Workflows and Processes - Resource Center

Looking for a library that can meet specific requirements related to diagram creation and rendering. We have explored jsplumbtoolkit, mermaid, and gojs, but none of these fully satisfy our needs. For example, we need the ability to dynamically change con ...

Navigating away from a component resulted in the object being unsubscribed

I have encountered an issue while trying to implement a virtual keypad in my application. The problem occurs when navigating from my second component back to the first component. I have created a stackblitz example showcasing this error. Check out the sta ...

Exploring the syntax of typescript when using createContext

Just starting out with typescript and I have some questions. Could someone break down the syntax used in this code snippet for me? What is the significance of having two groups containing signIn, signOut, and user here? Is the first group responsible fo ...

Issue with MUI icon import: React, Typescript, and MUI type error - Overload does not match this call

Within my component, I am importing the following: import LogoutIcon from "@mui/icons-material/Logout"; import useLogout from "@/hooks/auth/useLogout"; const { trigger: logoutTrigger } = useLogout(); However, when utilizing this compo ...

What is causing the element to disappear in this basic Angular Material Sidenav component when using css border-radius? Check out the demo to see the issue in action

I have a question regarding the Angular Material Sidenav component. I noticed that in the code below, when I increase the border-radius property to a certain value, the element seems to disappear. <mat-drawer-container class="example-container" ...

Creating personalized mapping for TypeScript objects

I have a TypeScript object structure that resembles the following: { "obj1" : { object: type1;}; "obj2" : { object: type2;}; "obj3" : { object: type3;}; "obj4" : { object: type4;}; "obj5" ...

What is the best way to implement a generic parameter with constraints in an abstract method?

Take a look at this scenario: interface BaseArgs { service: string } abstract class BaseClass { constructor(name: string, args: BaseArgs) { this.setFields(args) } abstract setFields<T extends BaseArgs>(args: T): void } interface ChildA ...