question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

External events (Angular version)

See original GitHub issue

Hi,

As you know ng-fullcalendar is now deprecated :
https://www.npmjs.com/package/ng-fullcalendar

So is-it possible to “convert” https://fullcalendar.io/docs/external-dragging in Angular version

I have defined calendar in HTML file:

<div *ngIf="options"> <full-calendar #calendar [allDaySlot]=options.allDaySlot [customButtons]="options.customButtons" [defaultView]="options.defaultView" [displayEventEnd]="options.displayEventEnd" [droppable]="options.droppable" [editable]="options.editable" [events]=events [header]="options.header" [height]="options.height" [locale]="options.locale" [plugins]="calendarPlugins" [slotDuration]="options.slotDuration" [slotEventOverlap]="options.slotEventOverlap" (dateClick)="dateClick($event)" (eventClick)="eventClick($event)" (eventDragStop)="dateClick($event)" (eventReceive)="eventReceive($event.detail)" ></full-calendar> </div>

I have defined the list of the elements i want to “drag & drop” on the calendar (html) <tbody > <tr *ngFor="let ticket of ticketList"> <td style="width: 10%"> <button class="btn btn-danger btn-round btn-fab btn-fab-mini"> <i (click)="deleteTicket(ticket.ticketDTO.idaiticket)" class="material-icons" title="Supprimer">delete</i> </button> </td> <td #customevents class='fc-event' [attr.data-idaiticket]="ticket.ticketDTO.idaiticket" data-duration='02:00'>TICKET N° {{ticket.ticketDTO.idaiticket}}</td> <td><b>{{ticket.siteDTO.libelle}}</b></td> <td >{{ticket.ticketDTO.message}}</td> </tr> </tbody>

And in TS file :

@ViewChildren('customevents') customevents: QueryList<any>; @ViewChild('calendar') calendarComponent: FullCalendarComponent; // the #calendar in the template options: OptionsInput; calendarPlugins = [dayGridPlugin, timeGrigPlugin, interactionPlugin]; events: Intervention [] = []; ticketList: Intervention [] = [];

this.options = { defaultDate: today, allDaySlot: false, defaultView: 'timeGridWeek', displayEventEnd: true, editable: true, locale: frLocale , height: 600, slotDuration : '00:15:00', slotEventOverlap: false, droppable: true, // eventLimit: false, customButtons: { myCustomButton: { text: 'Valider', click: function () { alert('clicked the custom button!'); } } }, header: { left: 'prev, next, today, myCustomButton', center: 'title', right: 'dayGridMonth, timeGridWeek, timeGridDay ' } };

But I dont’succeed to make element “draggable”…

Thank’s in advance

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chiraggmodicommented, Nov 25, 2019

is it possible to style the garbed event?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding event listeners outside of the Angular zone - Medium
In this article I'll present how to properly add event listeners outside of the Angular zone, so that the change detection is not...
Read more >
How do get the external events for Fullcalendar to work in ...
I have been trying to get external events working with Fullcalendar and Angular. I confess that I am new to Angular, and there...
Read more >
Running event listeners outside of the NgZone - InDepth.Dev
NgZone notifies Angular when to perform the change detection process (e.g. a DOM event with bound listener is one of the triggerers).
Read more >
NgZone - Angular
A zone is an execution context that persists across async tasks. You can think of it as thread-local storage for the JavaScript VM....
Read more >
ng2-events - npm
ng2-events. TypeScript icon, indicating that this package has built-in type declarations · For Angular 9-12 apps using View Engine, use version ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found