Dragging an element onto a schedule day

UI Components for Angular
Post Reply
nraphael
Posts: 10
Joined: 15 Apr 2016, 07:49

06 May 2016, 07:49

Hi,

Do you have any example code for dragging an element onto a specific day on the schedule? I have a list of elements that represent different event types (meeting, lunch, birthday etc). I need to be able to drag an element onto the calendar and have an event created on the correct day. I've managed to do the dragdrop bit except for extracting the correct day - it must be the day the button was dropped on.

Hope that makes sense.

Nick

nraphael
Posts: 10
Joined: 15 Apr 2016, 07:49

09 May 2016, 04:24

As a follow up. I can't seem to wire up the onEventDrop event. The following code does not fire the component event. Has anyone managed to get this working?

Code: Select all

    <p-schedule [events]="events"
                [header]="header"
                defaultDate="2016-01-01"
                [eventLimit]="4"
                [editable]="true"
                (onDayClick)="handleDayClick($event)"
                (onEventClick)="handleEventClick($event)"
                pDroppable="dd"
                (onEventDrop)="eventDrop($event)">
    </p-schedule>

    (in component)
    eventDrop(event) {
        let e = event;
    }

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests