Angular-calendar: Issue when dropping data on line between timeslot

Created on 16 Aug 2019  路  8Comments  路  Source: mattlewis92/angular-calendar

Describe the bug

Hi @mattlewis92 first I wanted to thank you for such a great calendar !

I've experienced an issue when I'm dropping data into to the calendar, somehow people are able to trigger the drop on the line between two time slots and it creates two events.
How could we manage and avoid that ?

Here below you can see the reproduction of the issue

Minimal reproduction of the problem with instructions

Get dragable data and drop it on the line between two time slots

Screenshots

timeSlots

Versions

  • @angular/core:7.2.2
  • angular-calendar:0.27.7
  • Browser name and version: Chrome Version 76.0.3809.100 (Build officiel) (64 bits)
bug has PR

All 8 comments

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider supporting me on Patreon

Oh how weird, I can't think of a nice solution to this right now, but in the meantime you could use a debounce on the function call to prevent it yourself: https://stackblitz.com/edit/angular-yg9dnf?file=demo/component.ts

Edit: possible solutions to try:

  • record the last element that was triggered by dragEnter and check it when dropping
  • add a new option to angular-draggable-droppable like borderWidth or maybe more flexible, validateDrop

Hi @mattlewis92,

Thank you for your answer I'll try that ASAP and of course I'll let you know if it fixed my issue.

I managed to find a fix for this, and it's in the next beta, you can try it with:

npm i angular-calendar@next

Hope that helps! 馃槃

Hi @mattlewis92

Well thank you very much for such a quick fix for this issue.
This works perfectly

Thanks :)

Any date for a next release ? :D

The last thing to do before I release 0.28 as stable is https://github.com/mattlewis92/angular-calendar/issues/888, but there are no more changes planned for the component itself, so please consider the beta version as being stable 馃槃

Great ! thanks again :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Seb69 picture Seb69  路  3Comments

agilob picture agilob  路  3Comments

daneshmandi picture daneshmandi  路  4Comments

sylvain-fr picture sylvain-fr  路  3Comments

Novabllast picture Novabllast  路  3Comments