Our pure JavaScript Scheduler component


Post by tomerPlanit »

Hi,
I work with scheduler 5.1.1and angular 13.
How can I get the real drop start date on "beforeEventDropFinalize" , "eventDrop" events?

in my case the use of beforeEventDropFinalize is async like this:

 event.context.async = true;
 event.context.finalize(isPass);

After read the documentation and in the support I found that I need take the start date from "event.context.eventRecord.startDate", but I found that the date net changed yet.

I check the hole context data in console with debugger after for stop the propagation in my case I drop the event like this:

Screenshot 2022-08-08 101631.png
Screenshot 2022-08-08 101631.png (20.87 KiB) Viewed 342 times

And can't find this date inside the context(I need this date before the finalize(true)).

Screenshot 2022-08-08 101904.png
Screenshot 2022-08-08 101904.png (106.82 KiB) Viewed 342 times

how can I solve my issue?


Post by tasnim »

Please Try eventRecords[0].data.startDate and let us know if it works.


Post by tomerPlanit »

HI Tasnim,
It looks the same as I explained before.

Attachments
Screenshot 2022-08-08 115429.png
Screenshot 2022-08-08 115429.png (162.43 KiB) Viewed 335 times

Post by tasnim »

Hi,
Could you please provide a runnable test case so we can debug it?


Post by tomerPlanit »

I create simple demo based on 5.1.1 v (basic demo).
I need the real start date between the async=true and finalize(true).
In drop event I need also the real drop start date and not after some shifting that you do.

For reproduce the problem you need to open the example and drop like this:

Screenshot 2022-08-09 111658.png
Screenshot 2022-08-09 111658.png (26.37 KiB) Viewed 312 times
Attachments
drop example.rar
(267.53 KiB) Downloaded 28 times

Post by tasnim »

I just dropped the event to 3 am. And It's showing 15:00(3 am) on the console. Please check the attachment

Attachments
Screenshot 2022-08-09 163106.png
Screenshot 2022-08-09 163106.png (97.86 KiB) Viewed 302 times

Post by tomerPlanit »

Please drop like I explain in the example.
If I want to drop one 15:10?


Post by tasnim »

I just dropped it on 10:15. and It works.

Attachments
Screenshot 2022-08-09 164749.png
Screenshot 2022-08-09 164749.png (112.49 KiB) Viewed 300 times

Post by tomerPlanit »

Try to drop in my initialize zoom not by change the zoom.


Post by tasnim »

Sorry that I misunderstood, I am not able to drop it in the initialized zoom to 10:15 am. I need to change the start date of the event with the editor. which is not going to trigger beforeEventDropFinalize.


Post Reply