Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #104433
    Andrea Durando
    Participant

    Hi all,

    in the scheduler i tryed to use the dropoverCell event, but seems do not work, this event should be fired when i release a draggable item on a cell, is that right?

    Do you have any example that can help me to resolve this issue?

    scheduler.html
    <div>
    <div>  <smart-scheduler #scheduler</div>
    <div>    id=”scheduler”</div>
    <div>    [view]=”view”</div>
    <div>    [views]=”[‘day’,’week’,’month’]”</div>
    <div>    [firstDayOfWeek]=”firstDayOfWeek”</div>
    <div>    [hideAllDay]=”true”</div>
    <div>    [colorScheme]=”[‘#D50000’, ‘#E67C73’, ‘#F4511E’, ‘#F6BF26’, ”]”</div>
    <div>    (onEditDialogOpening)=”openEditBooking($event)”</div>
    <div>    (onDateChange)=”changeDate($event)”</div>
    <div>    (onViewChange)=”viewChange($event)”</div>
    <div>    (onDropoverCell)=”onDropoverCell($event)”</div>
    <div>    /></div>
    </div>
    <div></div>
    scheduler.ts
    <div>
    <div> onDropoverCell (event: CustomEvent): void {</div>
    <div>    const detail = event.detail,</div>
    <div>        target = detail.target;</div>
    <div>       // date = detail.date,</div>
    <div>       // allDay = detail.allDay;</div>
    <div>    console.log(target.toString())</div>
    <div>    // event handling code goes here.</div>
    <div>  }</div>
    </div>
    Regards

    Andrea

    #104444

    Hi,

    The event that you need to use is dragEnd. The dropoverCell is a special event that is added primarily for Blazor.
    Just use dragEnd and everything will work.
    https://stackblitz.com/edit/github-6gi9ff?file=src/app/app.component.ts

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104445
    Andrea Durando
    Participant

    Ok clear thank’s,

    I there a way to avoid the Drop operation in dragEnd?

    I try with a return false with a eventPreventDefault and a stopPropagation but nothing work

     

    #104451
    Steven Peterson
    Participant

    Hi,

    Only the dragStart event is cancelable, the dragEnd cannot be canceled,

    Here is a link for the docs about drag events:
    https://www.htmlelements.com/docs/scheduler-event-drag-resize/#drag

    Best Regards,
    Steven Peterson

    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.