Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Calendar support only two action to manage events (edit & delete) #386

Closed
ysnjzl opened this issue Jul 7, 2016 · 2 comments
Closed

Calendar support only two action to manage events (edit & delete) #386

ysnjzl opened this issue Jul 7, 2016 · 2 comments

Comments

@ysnjzl
Copy link

ysnjzl commented Jul 7, 2016

The github issues tracker is for bug reports and feature requests ONLY. Please use stackoverflow or read the documentation and examples for support issues, as well as checking previous issues.

Issues that ignore this template will be closed without notice!

Bug description / Feature request:

I want to add new action to manage my events. However the calendar has only two option for events (edit & delete).

I didn't find any other entry aside these two.

Link to minimally-working plunker that reproduces the issue (starter template:

Versions

Angular:

Calendar directive:

Browser name and version:

@mattlewis92
Copy link
Owner

There currently isn't a way to do anything other than edit or deleting of events, I think a better API would probably be something like:

const events = [{
  startsAt: new Date(),
  title: 'Title',
  actions: [{
    label: '<i class="fa fa-edit"></i>',
    onClick(calendarEvent) {
      console.log('The edit icon was clicked', calendarEvent);
    }
  }];
}];

This would also cleanly get rid of the edit-event-html, delete-event-html, on-edit-event-click, on-delete-event-click options as well as event.editable and event.deletable

@gordon-to
Copy link

angular2 sanitizes innterHTML so using that label property to store a template requires allot of checking and to bypass security

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants