- Home
- Forum
- Angular - EJ 2
- How to open different event dialog on scheduling?
How to open different event dialog on scheduling?
Hi,
I have tree type of appointment and they have different fields. According to this i can call first dialog but how can it possible for the others. I want to open another different kind of dialog on scheduler.
I have tree type of appointment and they have different fields. According to this i can call first dialog but how can it possible for the others. I want to open another different kind of dialog on scheduler.
<div ngbDropdown class="d-inline-block" display="dynamic" placement="bottom left">
<button ngbDropdownToggle class="btn btn-primary" id="dropdownBasic1" matTooltip="Yeni Randevu Ekle">Yeni Randevu</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button class="dropdown-item" (click)="newClient()">Yeni Danışan</button>
<button class="dropdown-item" (click)="savedClient()">Kayıtlı Danışan</button>
<button class="dropdown-item" (click)="newPlanOrProgram()">Plan/Program</button>
</div>
</div>
// This is for first dialog.
newClient(): void {
let cellData: Object = {
startTime: new Date(2018, 1, 15, 10, 0)
};
this.scheduleObj.openEditor(cellData,'Add');
}
// This will be for second dialog.
savedClient(): void {
//?
}
// This will be for third dialog
newPlanOrProgram(): void {
//?
}
SIGN IN To post a reply.
3 Replies
BS
Balasubramanian Sattanathan
Syncfusion Team
February 12, 2020 11:11 AM UTC
Hi Tumer,
Greetings from Syncfusion Support.
We have analyzed your requirement and prepared sample based on that. In below sample, we have added three buttons and opened three dialog windows using below code snippet. We have attached UG link for your reference.
app.component.html :
|
<button #addButtonObj ejs-button cssClass='e-info' (click)='add()'> Add </button>
<button #editButtonObj ejs-button cssClass='e-info' (click)='edit()'> Edit </button>
<button #deleteButtonObj ejs-button cssClass='e-info' (click)='delete()'> Delete </button> |
app.component.ts :
|
add(): void {
let cellData: Object = {
startTime: new Date(2018, 1, 15, 10, 0),
endTime: new Date(2018, 1, 15, 11, 30),
};
this.scheduleObj.openEditor(cellData, 'Add');
}
edit(): void {
let apps: object[] = this.scheduleObj.getCurrentViewEvents();
if (apps.length) {
this.scheduleObj.openEditor(apps[0], 'Save');
}
}
delete(): void {
let activeEvent: any = this.scheduleObj.getCurrentViewEvents()[0];
if (activeEvent) {
this.scheduleObj.activeEventData.event = activeEvent;
this.scheduleObj.quickPopup.openDeleteAlert();
}
} |
Kindly try the above sample and let us know if you need any further assistance on this.
Regards,
Balasubramanian S
TÜ
Tümer
February 13, 2020 12:19 PM UTC
I meaned i need different dialogs than scheduler dialogs. I did it <ejs-dialog>. Everything seems fine now.
VM
Vengatesh Maniraj
Syncfusion Team
February 14, 2020 05:37 AM UTC
Hi Tumer,
Thanks for the update.
We are happy that you have found the solution for your requirement.
Please contact us if you need any further assistance.
Regards,
Vengatesh
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
TÜ Tümer
- Feb 11, 2020 11:34 AM UTC
- Feb 14, 2020 05:37 AM UTC