Reputation: 140
I have create kendo scheduler event.I want to delete this event by custom confirmation popup windows.show event information details on that custom popup windows and ask confirmation to user in angular js.
Upvotes: 3
Views: 1802
Reputation: 22064
There is no easy way. The only way I'm aware of is to remove default confirmation for good, then hook on anything that can trigger deletion of an event and override it with your own confirmation. Simple example to get you started:
$("#scheduler").kendoScheduler({
// ...
// disabling default confirmation
editable: { confirmation: false },
dataBound: function(e) {
var scheduler = e.sender;
$(".k-event").each(function () {
var uid = $(this).data("uid");
if (uid) {
var event = scheduler.occurrenceByUid(uid);
if (event) {
$(this).find(".k-event-delete").click(function (clc) {
// TODO: replace with nicer modal
if (confirm('Do you want to delete ' + event.title + ' ?'))
{
scheduler.removeEvent(uid);
}
clc.preventDefault();
clc.stopPropagation();
});
}
}
});
}
// ...
}
Also see my dojo: http://dojo.telerik.com/@svejdo1/igEHI
Upvotes: 3