- Home
- Forum
- Angular - EJ 2
- DragDrop updating in eventSettingsTemplate
DragDrop updating in eventSettingsTemplate
Hi,
I would like to update the Start and End time of an appointment which i am dragging it around. However, i am not able to make it works. even i am using onDrag() function.
this function is change the time on the appointment that i want to drag. but its not change its reflection while i am actually dragging around.
any advise would highly appreciate.
Thank you
export class AppComponent { private instance: Internationalization = new Internationalization(); public getTimeString(value: Date): string { return this.instance.formatDate(value, { skeleton: 'hm' }); } public onDrag(args: any): void { const draggingStartTime = args['startTime']; const draggingEndTime = args['endTime']; const eventElement = document.querySelector('.e-schedule-event-clone.e-drag-clone'); const timeElement = eventElement.querySelector('.time'); timeElement.textContent = `${this.getTimeString( draggingStartTime )} - ${this.getTimeString(draggingEndTime)}`; if (timeElement) { timeElement.innerHTML = timeElement.textContent; } } } |
Thank you
Daniel,
You are welcome. Get back to us if you need any further assistance.
in my html file <ejs-schedule>. i have this setup
(popupOpen)="onSyncfusionPopupOpen($event)"
[allowDragAndDrop]="true"
(dragStart)="onDragStart($event)"
(dragStop)="onDragStop($event)"
(drag)="onDrag($event)"
```
so i have a small issue when i switch my app to mobile mode (touch screen). then onSyncfusionPopupOpen() and DragDrop feature is not working well together.
With regular mode (Desktop):
- One click on appointment => onSyncfusionPopupOpen()
- Hold and move appointment => DragDrop
Now i switch to mobile mode (touch screen) in google chrome developer
- One touch on appointment => onSyncfusionPopupOpen() => Great
- Hold and move appointment => it keeps onSyncfusionPopupOpen() and not allow me to Drag and Drop
in touch screen mobile mode, i wish i can have one touch to open onSyncfusionPopupOpen() and if i touch and hold for about 2 seconds then it will be able to drag.
Sample: schedule-update-time-on-dragging-event (forked) - StackBlitz
Attachment: scheduledraganddropinmobileview_6523ec2f.zip
hi,
Thanks for responding.
I dont want the popupOpen triggers while i am dragging. so basically , if one touch => popupOpen, if touch and hold => dragging trigger (no popupOpen)
Thanks again
Daniel,
i was trying the example you gave me
https://schedule-update-time-on-dragging-event-45jwrb.stackblitz.io/
and open in google chrome developer mode and change to iphone 14 plus ( mobile view for example). I touch and hold the appointment, sometime its working as i expected ( dragging ), but most of the time its trigger the mouse's right click action.
Not sure what is missing
here is my onSyncfusionPopupOpen()
My application will be running in a touch screen AIO computer. It works perfectly using the mouse. but when my client start using their finger to drag appointments around. it start acting weird. i found out that without onSyncfusionPopupOpen() its working fine. but i need onSyncfusionPopupOpen() to show the detail of an appoit
- 11 Replies
- 2 Participants
- Marked answer
-
DD Daniel Duc Trinh
- Jul 15, 2024 04:49 AM UTC
- Jul 23, 2024 12:49 PM UTC